need help...
is there any way to
PLOT rectangle like this ( whenever price bar
go out of the rectangle
area , rectangle will
end plot-ing there )
like this ..
Yes, Approach is you need to define pair of line arrays from the starting and ending bar. Once you have the pair, you need to use plotohlc with style as styleArea.
_SECTION_BEGIN("Loud Cloud");
h1 = HHV(H, 10);
x1 = h1 == H;
l1 = LLV(L, 10);
x2 = l1 == L;
b1 = SelectedValue(ValueWhen(x1 OR x2, BarIndex()));
b2 = SelectedValue(BarIndex() + 10);
ls1 = LineArray(b1,SelectedValue(h1),b2,SelectedValue(h1),0);
ls2 = LineArray(b1,SelectedValue(l1),b2,SelectedValue(l1),0);
PlotOHLC(ls1,ls1,ls2,ls2,"", colorPink, styleCloud | styleArea);
_SECTION_END();