Hi Below is code,
When condition meet at current candel, it will not genrating any signal but when current candel is closed & open new candel then it give buy signal to the previous candel
But i want signal on current candel when condition meet, can anyone help me.
------------------------------------------
_SECTION_BEGIN("5 EMA High-Low");
SetChartOptions(0,chartShowArrows|chartShowDates);
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
Buy = Cross(C,HMA( High , 5 ));
Sell = Cross(HMA( Low , 5 ),Close);
Buy = ExRem( Buy, Sell );
Sell = ExRem( Sell, Buy );
PlotShapes(IIf(Sell==1, shapeDownArrow, shapeNone), colorRed, 0,High, Offset=-20);
PlotShapes(IIf(Buy==1, shapeUpArrow , shapeNone), colorGreen, 0,Low, Offset=-20);
Plot( EMA( Low,5), "",colorred);
Plot( EMA( High,5), "",colorred);
_SECTION_END();
When condition meet at current candel, it will not genrating any signal but when current candel is closed & open new candel then it give buy signal to the previous candel
But i want signal on current candel when condition meet, can anyone help me.
------------------------------------------
_SECTION_BEGIN("5 EMA High-Low");
SetChartOptions(0,chartShowArrows|chartShowDates);
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
Buy = Cross(C,HMA( High , 5 ));
Sell = Cross(HMA( Low , 5 ),Close);
Buy = ExRem( Buy, Sell );
Sell = ExRem( Sell, Buy );
PlotShapes(IIf(Sell==1, shapeDownArrow, shapeNone), colorRed, 0,High, Offset=-20);
PlotShapes(IIf(Buy==1, shapeUpArrow , shapeNone), colorGreen, 0,Low, Offset=-20);
Plot( EMA( Low,5), "",colorred);
Plot( EMA( High,5), "",colorred);
_SECTION_END();