Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Swing high and low
Collapse
X
-
Swing high and low
Using the strategy builder I'm trying to mark swing high and swing lows. So I am able to say if the high is greater than the high for the previous 10 bars using the (bars ago) line. But how do I say if the high is greater than the high 10 bars in front of it? It won't use negative numbers to reference bars in front of it. I have created a similar indicator in TOS and it looks like the attached image. You can see how it draws lines at the highs and lows.Tags: None
-
Hello Shiner452,
Thanks for your post.
If your intent is to create an indication of where the swing is you can use the swing indicator itself on the chart. If you do not like the use of the dots that Swing employs, you can easily change the display from Dots to a line by changing the plots "Plotstyle" in the indicator panel. I've attached a screenshot of what swing indicator looks like when these are set to a line plotstyle instead of the default dots:
-
Hello Shiner452,
Thanks for your post.
You are welcome to create anything that you wish but I will tell you that the Strategy builder will be a limitation in trying to reconstruct the swing indicator if that is your thinking.
I would suggest instead spending some time with the swing indicator to best understand how it works and testing various "strength" settings to have the indicator perform as you wish.
The swing indicator is a lagging indicator meaning that it does not confirm a swing until the "strength number of bars have passed provided that price has not exceeded that potential swing. Once the indicator has confirmed the swing, then at that point the dots are drawn back the strength number of bars to identify the swing point, and then on subsequent bars, the dots will continue to be drawn until price exceeds the current swing high indicating that a new potential swing high is occurring.
From a strategy builder perspective, what I would suggest is to create a double variable to hold the swing high and another to hold the swing low. Then create a set where the condition is (using strength setting of 5 (which is the default) Swing(5).SwingHigh[0] >Swing(5).SwingHigh[6] and the action would be to save the value of Swing(5).SwingHigh[6] into the double variable. The same but opposite in another set for the swing low. Then for trading check that the High data series crosses above the double variable, same but opposite for low.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Yesterday, 05:17 AM
|
0 responses
56 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
133 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
73 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
45 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
49 views
0 likes
|
Last Post
|

Comment