thanks for your time.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Strategy Help
Collapse
X
-
Strategy Help
Can someone tell me how to make reference to a peak or dip in an RSI value in a strategy?
thanks for your time.Tags: None
-
safetrading,
That is tricky. You need to objectively set out and define what a peak is and what a valley is. When you come up with objective rules then you can program it with the Strategy Wizard. It would just be a matter of comparing prior bar's values with the next bar's value to determine if it is up or down.Josh P.NinjaTrader Customer Service
-
Thanks for the reply. I understand how to reference different values from one bar to the next to create a peak or dip, but what I don't understand is how to refernece that in time. For example, I could say a peak made by the preceding bar being less than the current bar, and next bar is also less than the current bar.
Now we have a peak, but how do I reference that point in time whether is is one bar ago, or 5 bars ago?
Originally posted by NinjaTrader_Josh View Postsafetrading,
That is tricky. You need to objectively set out and define what a peak is and what a valley is. When you come up with objective rules then you can program it with the Strategy Wizard. It would just be a matter of comparing prior bar's values with the next bar's value to determine if it is up or down.
Comment
-
From programming you can set yourself a variable that records what bar the peak was formed and then you can just access this variable whenever you need it.
Now you know which bar it occured on. If you wanted to access the price of this bar in the future you can now do something like this:Code:if (....... peak logic) peakOccurence = CurrentBar;
Code:Close[CurrentBar - peakOccurence]
Josh P.NinjaTrader Customer Service
Comment
-
Thanks, I'll give it a try.
Originally posted by NinjaTrader_Josh View PostFrom programming you can set yourself a variable that records what bar the peak was formed and then you can just access this variable whenever you need it.
Now you know which bar it occured on. If you wanted to access the price of this bar in the future you can now do something like this:Code:if (....... peak logic) peakOccurence = CurrentBar;
Code:Close[CurrentBar - peakOccurence]
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Hwop38, 05-04-2026, 07:02 PM
|
0 responses
164 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|
||
|
Started by CaptainJack, 04-24-2026, 11:07 PM
|
0 responses
317 views
0 likes
|
Last Post
by CaptainJack
04-24-2026, 11:07 PM
|
||
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
245 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
350 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
179 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|

Comment