Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
Indicator that alerts me when candle is 10 pts big
Collapse
X
-
Indicator that alerts me when candle is 10 pts big
Hi can anyone help me code a simple indicator that alerts me when a candle is 10pts big on the e-mini on the 5 minute chart. So from open of the candle till close of the candle has to be 10pts. -
Hello wallsteetking,
Welcome to the NinjaTrader forums!
Below is a snippet that will do this. From open to close like this suggests a down candle. You can reverse for an up candle or take absolute value if direction doesn't matter.
if (Open[0] - Close[0] == 10)
Alert("myAlert", Priority.High, "AlertMessage", "SoundFile", 0, Color.White, Color.Black);Ryan M.NinjaTrader Customer Service
-
Thank you for you help Ryan. I have one more question is it possible to have the code say
= If 2 X 10pts (one candle after another) that the alert goes off.
Comment
-
Yes, you can add:
if (Open[0] - Close[0] == 10 && Open[1] - Close[1] == 10)
Alert("myAlert", Priority.High, "AlertMessage", "SoundFile", 0, Color.White, Color.Black);
Since you're accessing index values one bar back, make sure you follow this post to avoid errors when running the script:
Ryan M.NinjaTrader Customer Service
Comment
-
Need help
Dear Ryan
thank you for your help on helping me make my custom indicator. However, I am having problem writing the script. It seems every time I type in the code in Ninja Script I get an error. could you please help me write the code and upload the indicator.
All I want is a indicator that alerts ( Yellow highlight or alarm) if If 2 X 10pts or greater..... For example if the candle closes 11pts it does not matter it has to close above 10 though.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by maybeimnotrader, Today, 05:46 PM
|
0 responses
6 views
0 likes
|
Last Post Today, 05:46 PM | ||
Started by quantismo, Today, 05:13 PM
|
0 responses
6 views
0 likes
|
Last Post
by quantismo
Today, 05:13 PM
|
||
Started by AttiM, 02-14-2024, 05:20 PM
|
8 responses
166 views
0 likes
|
Last Post
by jeronymite
Today, 05:00 PM
|
||
Started by cre8able, Today, 04:22 PM
|
0 responses
8 views
0 likes
|
Last Post
by cre8able
Today, 04:22 PM
|
||
Started by RichStudent, Today, 04:21 PM
|
0 responses
5 views
0 likes
|
Last Post
by RichStudent
Today, 04:21 PM
|
Comment