I somes times use an indicator that, to make his calculations, look for the last time the High of the candle was visited, in the past. That means the calculation looks for this price on the 'left' side of the current candle.
I would like to do exactly the same, but that the calculation looks for this High price on the right side of the current candle, to make the calculation.
The code part associated with this function is this :
- Code: Select all
function FindHigh(index)
local i=index-1;
while i>first do
if source.high[i]>=source.high[index] then
return i;
end
i=i-1;
end
return nil;
What should I modify to make the change ? (if possible)
Thank you very muchfor your help ! :)
030985