//===============Price================
_SECTION_BEGIN("Price1");
OptimizerSetEngine("cmae");
SetPositionSize( 100, spsShares);
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();
SetBarsRequired(200,0);
GraphXSpace = 5;
Ob = OBV();
per = Optimize("per",Param("per",200,20,200,1),20,200,1);
SlowObv = EMA(Ob,per);
Cover=Buy = Cross(Ob,SlowObv);
Short=Sell=Cross(SlowObv,Ob);
Buy = ExRem(Buy,Sell);
SellPrice=ValueWhen(Sell,C,1);
BuyPrice=ValueWhen(Buy,C,1);
_SECTION_END();
//=================TITLE================================================================================================
_SECTION_BEGIN("Title");
// Print Short and Exit Arros
PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorRed, 0, H, Offset=40);
PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorOrange, 0,H, Offset=50);
PlotShapes(IIf(Sell, shapeDownArrow, shapeNone),colorWhite, 0,H, Offset=-45);
PlotShapes(IIf(Cover, shapeSquare, shapeNone),colorYellow, 0, L, Offset=-40);
PlotShapes(IIf(Cover, shapeSquare, shapeNone),colorDarkYellow, 0,L, Offset=-50);
PlotShapes(IIf(Cover, shapeUpArrow, shapeNone),colorBlack, 0,L, Offset=-45);
//Pring Long and Exit Arrow
PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorGreen, 0, L, Offset=-40);
PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorLime, 0,L, Offset=-50);
PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorWhite, 0,L, Offset=-45);
PlotShapes(IIf(Short, shapeSquare, shapeNone),colorYellow, 0, H, Offset=40);
PlotShapes(IIf(Short, shapeSquare, shapeNone),colorDarkYellow, 0,H, Offset=50);
PlotShapes(IIf(Short, shapeDownArrow, shapeNone),colorBlack, 0,H, Offset=-45);