I've come to like the standard Ninja Swing indicator, but I feel it would be much more useful to me if I could integrate it into a custom strategy. What I'd like to do is to call it from a strategy and compare the VALUES of the last 2 "Swing High" / "Swing Low" Lines it has drawn on the chart.
Example:
Swing High 1 (most recent Swing High) = 120
Swing High 2 (2nd most recent Swing High) = 100
By extracting the values from the indicator and integrating them into a strategy I can then define an Up/Downtrend. In the example above it would obviously be an uptrend (120-100) = +20 => Trend is Up
I'd very much appreciate it if I could get some help in achieving that.
What I'd like to know specifically is how to:
-Call the Swing indicator from a strategy
-Save the last 2 Swing High/Low values in order to be able to compare them
Thanks
Comment