i already posted a question about this indicator but I found again something that I did not understand
In this indicator Autotrendlinecreated by you or your colleague NinjaTrader_Paul
https://ninjatraderecosystem.com/use...totrendline-2/
Direct link https://ninjatraderecosystem.com/use...425d1651141555
can you explain me how this instruction 128 or 176 works
there is a loop
for (int barsAgo = upTrendEndBarsAgo - 1; barsAgo >= 0; barsAgo--)
{
if (Close[barsAgo] < endBarPrice + (Math.Abs(upTrendEndBarsAgo - barsAgo) * changePerBar))
barsAgo starts when there is a signal
upTrendEndBarsAgo last bar that touches the trend
in barAgo is desincremented
and each time have tested Close[barAgo ]
sometimes barAgo exceeds 30
so how do we test Close[30]? (example)
whereas normally we test the last bar that will close or cross the trend
Thank you for your patient
Comment