Ohlc bar quaters and half

Many thanks to the senior coders for helping me earlier with AFL related question.I would like to mark the middle ie.Half of the OHLC bar with a colored Dash or a colored dot.Will be great if the same thing can be performed for the Bar quaters also.

@krisnara one simple way to do it is:

midPoint = iif( C > O, O + ( C - O ) / 2, C + ( O - C ) / 2 );

Plot( C, "Close", colorDefault, styleCandle );

// Z-index is set to bring the "dot" to the front regardless of the order of the plots in the code
Plot( midPoint, "", colorYellow, styleDots | styleNoLine, Null, Null, 0, 1 ); 

Apply a similar logic to plot the "quarters" or change the code as needed if you want to calculate the mid points from H/L.

1 Like

I managed to code it further using your Logic. Thanks.