alarm or strategy in ninja for st indicator - futures io
futures io



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 Big Mike with 1 posts (1 thanks)
    1. trending_up 12,799 views
    2. thumb_up 25 thanks given
    3. group 6 followers
    1. forum 49 posts
    2. attach_file 8 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

 
Search this Thread
 

alarm or strategy in ninja for st indicator

(login for full post details)
  #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: 98 given, 122 received

red,
Thank you again.

Reply With Quote

Can you help answer these questions
from other members on futures io?
Bank account
Psychology and Money Management
Does it affect the long run performance if I forcibly cl …
Emini and Emicro Index
Portfolio Management Tool/Software
Psychology and Money Management
Color templates for MT5 40 items
Platforms and Indicators
For the experts of Metastock
Platforms and Indicators
 
Best Threads (Most Thanked)
in the last 7 days on futures io
Al Brooks Trading Course (www.brookstradingcourse.com)
29 thanks
Fail to Plan - Plan to Fail: What can go wrong?
22 thanks
Losing faith...
21 thanks
Where do you get your financial news & investment ideas?
18 thanks
Holding futures overnight
17 thanks
 
(login for full post details)
  #42 (permalink)
 NJAMC 
Atkinson, NH USA
 
Experience: Intermediate
Platform: NinjaTrader 8/TensorFlow
Broker: NinjaTrader Brokerage
Trading: Futures, CL, ES, ZB
 
NJAMC's Avatar
 
Posts: 1,970 since Dec 2010
Thanks: 3,036 given, 2,379 received


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 futures io Trade Journal Reply With Quote
 
(login for full post details)
  #43 (permalink)
 redratsal 
Milan (I)
 
Experience: Advanced
Platform: Ninjatrader
Broker: Kinetick
Trading: FDAX,6E,CL,YM,NQ,ES
 
redratsal's Avatar
 
Posts: 1,653 since Oct 2010
Thanks: 1,215 given, 2,084 received



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 futures io Trade Journal Reply With Quote
 
(login for full post details)
  #44 (permalink)
 redratsal 
Milan (I)
 
Experience: Advanced
Platform: Ninjatrader
Broker: Kinetick
Trading: FDAX,6E,CL,YM,NQ,ES
 
redratsal's Avatar
 
Posts: 1,653 since Oct 2010
Thanks: 1,215 given, 2,084 received

@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
Register to download File Type: cs anaSuperTrendsound.cs (15.0 KB, 61 views)
Visit my futures io Trade Journal Reply With Quote
The following 3 users say Thank You to redratsal for this post:
 
(login for full post details)
  #45 (permalink)
 neilzep 
us
 
 
Posts: 45 since Dec 2010

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

Reply With Quote
 
(login for full post details)
  #46 (permalink)
 redratsal 
Milan (I)
 
Experience: Advanced
Platform: Ninjatrader
Broker: Kinetick
Trading: FDAX,6E,CL,YM,NQ,ES
 
redratsal's Avatar
 
Posts: 1,653 since Oct 2010
Thanks: 1,215 given, 2,084 received


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 futures io Trade Journal Reply With Quote
 
(login for full post details)
  #47 (permalink)
 mmaker 
Toronto Canada
 
Experience: Intermediate
Platform: ninjatrader
Trading: es
 
mmaker's Avatar
 
Posts: 389 since Feb 2011
Thanks: 1,177 given, 487 received


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 futures io Trade Journal Reply With Quote
 
(login for full post details)
  #48 (permalink)
 ciardim 
it
 
Experience: Advanced
Platform: mc
 
Posts: 32 since Jun 2010
Thanks: 59 given, 3 received

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
 
(login for full post details)
  #49 (permalink)
 redratsal 
Milan (I)
 
Experience: Advanced
Platform: Ninjatrader
Broker: Kinetick
Trading: FDAX,6E,CL,YM,NQ,ES
 
redratsal's Avatar
 
Posts: 1,653 since Oct 2010
Thanks: 1,215 given, 2,084 received


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 futures io Trade Journal Reply With Quote
 
(login for full post details)
  #50 (permalink)
 trade65 
Napa Valley , Ca.
 
Experience: Intermediate
Platform: NinjaTrader
Trading: Currency Futures
 
trade65's Avatar
 
Posts: 26 since Aug 2011
Thanks: 816 given, 67 received



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:	88
Size:	88.1 KB
ID:	54740  
Reply With Quote


futures io Trading Community Platforms and Indicators NinjaTrader > alarm or strategy in ninja for st indicator


Last Updated on November 12, 2011


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
     



Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada), info@futures.io
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.
no new posts