NexusFi: Find Your Edge


Home Menu

 





alarm or strategy in ninja for st indicator


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one redratsal with 22 posts (24 thanks)
    2. looks_two meyer99 with 16 posts (0 thanks)
    3. looks_3 ciardim with 6 posts (0 thanks)
    4. looks_4 NJAMC with 1 posts (0 thanks)
    1. trending_up 17,566 views
    2. thumb_up 25 thanks given
    3. group 6 followers
    1. forum 49 posts
    2. attach_file 8 attachments




 
Search this Thread

alarm or strategy in ninja for st indicator

  #41 (permalink)
 meyer99 
Charlotte NC
 
Experience: Advanced
Platform: Charts:TOS, execution:TOS
Broker: TOS
Trading: SPX, RUT. TQQQ, Stocks, /YM
Posts: 234 since Jul 2009
Thanks Given: 99
Thanks Received: 122

red,
Thank you again.

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
ZombieSqueeze
Platforms and Indicators
Better Renko Gaps
The Elite Circle
Deepmoney LLM
Elite Quantitative GenAI/LLM
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Exit Strategy
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
61 thanks
Funded Trader platforms
39 thanks
NexusFi site changelog and issues/problem reporting
26 thanks
Battlestations: Show us your trading desks!
26 thanks
The Program
18 thanks
  #42 (permalink)
 
NJAMC's Avatar
 NJAMC 
Atkinson, NH USA
Market Wizard
 
Experience: Intermediate
Platform: NinjaTrader 8/TensorFlow
Broker: NinjaTrader Brokerage
Trading: Futures, CL, ES, ZB
Posts: 1,970 since Dec 2010
Thanks Given: 3,037
Thanks Received: 2,394


redratsal View Post
Try also this one, I didn't have time to test it, should make a sound 2 ticks before the trend changes. Please report back.

Hi Red,

I am not sure if this is correct in this code:

 
Code
 
if (GetCurrentAsk() == anaSuperTrend(3, 21, 5).StopLine[0] + -2 * TickSize
&& GetCurrentAsk() == anaSuperTrend(3, 21, 5).StopLine[0] + 2 * TickSize)
{
PlaySound(@"C:\Program Files (x86)\NinjaTrader 7\sounds\Alert1.wav");
}
This would only fire if TickSize was equal to 0, and then it would fire every time through the
OnBarUpdate(). It might be an OR rather than AND... I am not sure if there is a spacial bar type, but if you could elaborate, I would appriciate it.
-NJAMC

Visit my NexusFi Trade Journal Reply With Quote
  #43 (permalink)
 
redratsal's Avatar
 redratsal 
Milan (I)
 
Experience: Advanced
Platform: Ninjatrader
Broker: Kinetick
Trading: FDAX,6E,CL,YM,NQ,ES
Posts: 1,648 since Oct 2010
Thanks Given: 1,215
Thanks Received: 2,090



NJAMC View Post
Hi Red,

I am not sure if this is correct in this code:

 
Code
 
if (GetCurrentAsk() == anaSuperTrend(3, 21, 5).StopLine[0] + -2 * TickSize
&& GetCurrentAsk() == anaSuperTrend(3, 21, 5).StopLine[0] + 2 * TickSize)
{
PlaySound(@"C:\Program Files (x86)\NinjaTrader 7\sounds\Alert1.wav");
}
This would only fire if TickSize was equal to 0, and then it would fire every time through the
OnBarUpdate(). It might be an OR rather than AND... I am not sure if there is a spacial bar type, but if you could elaborate, I would appriciate it.
-NJAMC


You are correct it is an OR, problem it won't work anyway since getcurrentask will never be equal to anasupertrend, you will have to change the variable type an the plotting would not be correct anymore.

Visit my NexusFi Trade Journal Reply With Quote
  #44 (permalink)
 
redratsal's Avatar
 redratsal 
Milan (I)
 
Experience: Advanced
Platform: Ninjatrader
Broker: Kinetick
Trading: FDAX,6E,CL,YM,NQ,ES
Posts: 1,648 since Oct 2010
Thanks Given: 1,215
Thanks Received: 2,090

@ciardim

Hi,

Find attached the indicator anasupertrend modified as requested. The Indy will make a different sound (uptrend,downtrend) if the price will be +/- n ticks from the supertrend. Since I could not match the supertrend value with the market price (different variable types) I had to set the sounds in a tick fork of values (above and below the current price), for example if the trend will change at 1.4253 and ticks are set to 2, the indy will sound between 1.4251 and 1.4255. Basically you want to be advised before the change and that is what the indy does. Beware that in a fast moving market, 2 ticks are too close and the price might not notice the sound therefore I decided to customize the number of ticks before the change of trend. In the indy setup meny under options you can customize the number of ticks before the change of trend. I tested it in the replay mode and it should work correctly.

Attached Files
Elite Membership required to download: anaSuperTrendsound.cs
Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #45 (permalink)
 neilzep 
us
 
Posts: 44 since Dec 2010

getting a error when I copy it to a indicator. Line 43 MedianMoving average not defined...

Reply With Quote
  #46 (permalink)
 
redratsal's Avatar
 redratsal 
Milan (I)
 
Experience: Advanced
Platform: Ninjatrader
Broker: Kinetick
Trading: FDAX,6E,CL,YM,NQ,ES
Posts: 1,648 since Oct 2010
Thanks Given: 1,215
Thanks Received: 2,090


neilzep View Post
getting a error when I copy it to a indicator. Line 43 MedianMoving average not defined...

You need to install the original one, try with the search option

Visit my NexusFi Trade Journal Reply With Quote
  #47 (permalink)
 
mmaker's Avatar
 mmaker 
Toronto Canada
 
Experience: Intermediate
Platform: ninjatrader
Trading: es
Frequency: Several times daily
Duration: Minutes
Posts: 400 since Feb 2011
Thanks Given: 1,178
Thanks Received: 508


redratsal View Post
@ ciardim

Hi,

Find attached the indicator anasupertrend modified .

Sorry for posting this here but I don't know who to contact regarding this indicator.

I upgraded Ninja to ver 7.5 and now when i try to save my workspace i am getting a message that says anaSupertrend could not be serialized.

I also tried to refer to the dataseries and several variables in anaSuperTrend from a strategy and they usually come back as true which is incorrect since the trend cannot be long for 2 months solid. Yet when I print the same info from inside the indicator you can see the values change more frequently (true, false, true....) the way they should leading me to believe it is not serializing properly.

I really do not understand serializing but it sounds like the storing of a dataseries/ variables.

The second symptom is when you try to save the workspace anaSuperTrend does not save but the other 20? indicators on 14 charts do. So every morning I have to re-apply anaSuperTrend to my main chart.

Rebuilding the chart does not solve the problem.

So my question is has anyone else had this problem?

I would like to refer to anaSuperTrend to build a strategy but cannot the way it is working now.

I am looking for a zip file i can modify.

Any help is greatly appreciated.

Visit my NexusFi Trade Journal Reply With Quote
  #48 (permalink)
 ciardim 
it
 
Experience: Advanced
Platform: mc
Posts: 32 since Jun 2010
Thanks Given: 59
Thanks Received: 3

Red, thank you very much for all
i have a problems, i try to iport strategy and/or indicator in ninja, but ninja telle me error
someone can see my pc with team viewer?
i have two pc, one is ok, other i can not import ninja script
thank you to all


redratsal View Post
@ ciardim

Hi,

Find attached the indicator anasupertrend modified as requested. The Indy will make a different sound (uptrend,downtrend) if the price will be +/- n ticks from the supertrend. Since I could not match the supertrend value with the market price (different variable types) I had to set the sounds in a tick fork of values (above and below the current price), for example if the trend will change at 1.4253 and ticks are set to 2, the indy will sound between 1.4251 and 1.4255. Basically you want to be advised before the change and that is what the indy does. Beware that in a fast moving market, 2 ticks are too close and the price might not notice the sound therefore I decided to customize the number of ticks before the change of trend. In the indy setup meny under options you can customize the number of ticks before the change of trend. I tested it in the replay mode and it should work correctly.


Started this thread Reply With Quote
  #49 (permalink)
 
redratsal's Avatar
 redratsal 
Milan (I)
 
Experience: Advanced
Platform: Ninjatrader
Broker: Kinetick
Trading: FDAX,6E,CL,YM,NQ,ES
Posts: 1,648 since Oct 2010
Thanks Given: 1,215
Thanks Received: 2,090


ciardim View Post
Red, thank you very much for all
i have a problems, i try to iport strategy and/or indicator in ninja, but ninja telle me error
someone can see my pc with team viewer?
i have two pc, one is ok, other i can not import ninja script
thank you to all

You need the original anasupertrend on both computers, my supposed conclusion is that in the one where the error is showing the indy is missing.

Visit my NexusFi Trade Journal Reply With Quote
  #50 (permalink)
 
trade65's Avatar
 trade65 
Napa Valley , Ca.
 
Experience: Intermediate
Platform: NinjaTrader
Trading: Currency Futures
Posts: 26 since Aug 2011
Thanks Given: 816
Thanks Received: 67



redratsal View Post
@ ciardim

Hi,

Find attached the indicator anasupertrend modified as requested. The Indy will make a different sound (uptrend,downtrend) if the price will be +/- n ticks from the supertrend. Since I could not match the supertrend value with the market price (different variable types) I had to set the sounds in a tick fork of values (above and below the current price), for example if the trend will change at 1.4253 and ticks are set to 2, the indy will sound between 1.4251 and 1.4255. Basically you want to be advised before the change and that is what the indy does. Beware that in a fast moving market, 2 ticks are too close and the price might not notice the sound therefore I decided to customize the number of ticks before the change of trend. In the indy setup meny under options you can customize the number of ticks before the change of trend. I tested it in the replay mode and it should work correctly.


Hi Redratsal,

I recieve the error illustrated in the attached screenshot when i tried to compile your sound alert indicator for anaSupertrend. I do have anaSupertrend installed. Do i need a particuliar version?

Thanks for your help

Sean

Attached Thumbnails
Click image for larger version

Name:	anaSuperTrendsounderror.JPG
Views:	205
Size:	88.1 KB
ID:	54740  
Reply With Quote




Last Updated on November 12, 2011


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts