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
filtering triggers by range
Collapse
X
-
filtering triggers by range
Is it possible to have an alert trigger only if the close of the current bar is a greater than or equal to a specific number of ticks from the high x number of bars back? What I want to do is filter out tight ranges from my alerts so if I set the minimum range to be at least 10 ticks from the trigger to the previous high or low x number of bars back it wont send an alert unless that condition is met in addition to the other conditions of the alert. If this is possible please provide the code for it's implementation. Thanks in advance.Tags: None
-
Hello gordongekko,
Thank you for your note.
Yes this would be possible.
If you’d like to check if the current price is above the high 5 bars ago, plus 5 ticks, you would use,
Code:if(Close[0]>High[5] +5*TickSize)
To add ticks to a specific value, you use TickSize,
To Trigger the Alert you would use,
Please let us know if you need further assistance.Alan P.NinjaTrader Customer Service
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by samish18, Today, 10:13 AM
|
0 responses
2 views
0 likes
|
Last Post
by samish18
Today, 10:13 AM
|
||
Started by kenz987, Yesterday, 10:20 AM
|
2 responses
12 views
0 likes
|
Last Post
by kenz987
Today, 10:13 AM
|
||
Started by nicthe, 08-23-2023, 07:53 AM
|
7 responses
196 views
0 likes
|
Last Post
by nicthe
Today, 09:26 AM
|
||
Started by nicthe, Today, 09:24 AM
|
0 responses
5 views
0 likes
|
Last Post
by nicthe
Today, 09:24 AM
|
||
Started by stalt, 12-28-2015, 01:36 PM
|
6 responses
1,536 views
0 likes
|
Last Post
by giulyko00
Today, 09:16 AM
|
Comment