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 andrewtrades, Today, 04:57 PM
|
1 response
8 views
0 likes
|
Last Post Today, 05:02 PM | ||
Started by chbruno, Today, 04:10 PM
|
0 responses
6 views
0 likes
|
Last Post
by chbruno
Today, 04:10 PM
|
||
Started by josh18955, 03-25-2023, 11:16 AM
|
6 responses
436 views
0 likes
|
Last Post
by Delerium
Today, 03:42 PM
|
||
Started by FAQtrader, Today, 03:35 PM
|
0 responses
7 views
0 likes
|
Last Post
by FAQtrader
Today, 03:35 PM
|
||
Started by rocketman7, Today, 09:41 AM
|
5 responses
19 views
0 likes
|
Last Post Today, 03:33 PM |
Comment