thanks for your time.
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
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.
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.
Code:if (....... peak logic) peakOccurence = CurrentBar;
Code:Close[CurrentBar - peakOccurence]
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by geddyisodin, Today, 05:20 AM
|
1 response
11 views
0 likes
|
Last Post Today, 07:38 AM | ||
Started by Max238, Today, 01:28 AM
|
3 responses
32 views
0 likes
|
Last Post
by Max238
Today, 07:36 AM
|
||
Started by timko, Today, 06:45 AM
|
2 responses
13 views
0 likes
|
Last Post Today, 07:30 AM | ||
Started by habeebft, Today, 07:27 AM
|
0 responses
5 views
0 likes
|
Last Post
by habeebft
Today, 07:27 AM
|
||
Started by Tim-c, Today, 03:54 AM
|
1 response
8 views
0 likes
|
Last Post Today, 07:26 AM |
Comment