I'm writing an indicator for pattern recognition.
The indicator looks for lower highs and it starts looking for an high and marks it with a dot.
But if an higher high occurs I want to mark this recent one as the high and erase provious plotted dot.
This is the code but it doesn't erase previous dots
Code: Select all
if stato = 0 and High > Highest(High,20) and High < High then
stato = 1;
barCount = 0;
PVH1 = High;
PVH1Pos = BarNumber;
Plot1[BarNumber - PVH1Pos + 1](PVH1,"1");
Print("Trovato 1 il ", Date);
if stato = 1 then
barCount = barCount + 1;
if barCount > numBarreReset then stato = 0;
if high > PVH1 then begin
PVH1 = high;