Announcement
Collapse
No announcement yet.
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,
If you were interested if the current bar was highest of the last x bars, you could use HighestBar to get the bar index of the highest high of the last n bars, then pass that index to High[bar index] to get the high of that bar.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 Mindset, 04-21-2026, 06:46 AM
|
0 responses
85 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
123 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
64 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|
||
|
Started by cmoran13, 04-16-2026, 01:02 PM
|
0 responses
114 views
0 likes
|
Last Post
by cmoran13
04-16-2026, 01:02 PM
|
||
|
Started by PaulMohn, 04-10-2026, 11:11 AM
|
0 responses
67 views
0 likes
|
Last Post
by PaulMohn
04-10-2026, 11:11 AM
|

Comment