I am trying to code a custom indicator to plot fractal highs and lows, i am not able to set the last high bar to transparent using the below code, Please help.
if(spl == false && sph == true && lasthigh < High[period])
{
RemoveDrawObject("high"+lasthighbar);
PlotBrushes[0][lasthighbar] = Brushes.Transparent;
Draw.TriangleUp(this,"high"+ (CurrentBar - period),true,period,High[period],Upcolor);
lasthigh = High[period]; // Save the last High value for next ray drawn
lasthighbar = CurrentBar - period;
}
FYI https://ibb.co/ZGmC7Jz

Comment