The below code works for range bars but not the flex renko.
Code: Select all
Vars:
BAplotLoop(maxbarsforward),
k(0),
projHigh(0),
projLow(0);
//if bartype = 13 then begin // plot only if this is a range bar
If LastBarOnChart then begin
projHigh = low + (h[1]-l[1]);
projLow = high - (h[1]-l[1]);
for k = 0 to BAplotLoop begin
Plot1[-k](projHigh, "High");
Plot2[-k](projLow, "Low");
end;
noplot(1);
noplot(2);
// end;
end;