I added the Zigzag indicator into my strategy to find Highs and Lows, code below
ZigZag1 = ZigZag(Close, DeviationType.Percent, 0.05, true);
ZigZag1.Plots[0].Brush = Brushes.DodgerBlue;
AddChartIndicator(ZigZag1);
When i add the zigzag output in my chart I can see it's making unexpected highs and lows, I'm attaching a screenshot. When I use the same settings and add zigzag as an indicator, it's definitely not matching the output from the strategy. Is this something you guys can look at?
Just for context, I use Zigzags barsAgo function to capture past highs and lows in my strategy.
int first_high_barsAgo = ZigZag1.HighBar(0, 1, 999);
int second_high_barsAgo= ZigZag1.HighBar(0, 2, 999);
Is there another method you can suggest to capture past highs and lows since this hasn't worked for me perfectly?
Thanks
M
Comment