The vertical guides disappear when you change the magnification

A request for help in correcting the code and explaining what is wrong. The vertical guides disappear when you change the magnification.

EMA_100=EMA(C,100);
EMA_500=EMA(C,500);
EMA_1000=EMA(C,1000);


_SECTION_BEGIN("WykresyEMA");
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();


trigger_buy=Cross(EMA_500,EMA_1000);
trigger_sell=Cross(EMA_1000,EMA_500); 
ost_buy=ValueWhen(trigger_buy,EMA_500);
ost_sell=ValueWhen(trigger_sell,EMA_500);
zmiennosc=40;


	LineColor2 = ParamColor( "Line color2", colorBlue);
	FirstBar2 = IIf(abs(ost_buy-ost_sell)>zmiennosc,Cross(EMA_100,EMA_500),0);
	Plot( FirstBar2, "", LineColor2,  styleOwnScale | styleThick);
	PlotShapes(IIf(FirstBar2, shapeUpTriangle, shapeNone),colorBlue, 0,L, Offset=80);

image

image

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.