_SECTION_BEGIN("OBV Hi Lo");
y = Param("Ribbon Y",5,0,500,5);
Ob = OBV(); Hi = HHV(Ob,15); Lo = LLV(Ob,15);
B1 = Cross(Ob,Ref(Hi,-1)); S1 = Cross(Ref(Lo,-1),Ob);
B1 = ExRem(B1,S1); S1 = ExRem(S1,B1);
UP1 = Flip(B1,S1); DN1 = Flip(S1,B1);
e3 = EMA(Ob,3); e200 = EMA(Ob,200); e36 = EMA(Ob,36);
nd = Day()!=Ref(Day(),-1);
lb = Day()!=Ref(Day(),1);
ob = OBV();
zero = ValueWhen(lb,ob);
//Plot(10,"",IIf(UP1,colorBlue,colorRed),styleOwnScale|styleNoLabel|styleThick,0,500,0,-5,8);
PlotOHLC(y,Y+10,y,y,"",IIf(UP1,colorBlue,colorRed),styleOwnScale|styleNoLabel|styleCloud,0,500);
showVerticalObvlines15 = ParamToggle("Show vertical line for 15 ribbon change", "No|Yes", 0) ;
if (showVerticalObvlines15)
{
Plot(IIf(B1,1,0),"",colorBlue,styleOwnScale|styleNoLabel|styleHistogram|styleDashed,0,1);
Plot(IIf(S1,1,0),"",colorRed, styleOwnScale|styleNoLabel|styleHistogram|styleDashed,0,1); //vertical lines
}