Hi,
I have a query, I would like to combine the simple trading system and the price chart but I am unable to do it.
I would also like to have buy and sell signals. But the signals are also not popping up.
Hope you can surely help me.
_SECTION_BEGIN("Price");
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();
_SECTION_BEGIN("Background_Setting");
SetChartBkGradientFill( ParamColor("BgTop", colorBlack),
ParamColor("BgBottom", colorDarkGrey),ParamColor("TitleBack",colorGrey40) );
SetChartBkColor(ParamColor("Outer Panel",colorPaleBlue));
SetChartOptions(0,chartShowArrows|chartShowDates);
_SECTION_END();
//AA = Param("AA", 0.1, 0.0, 1.0, 0.01);
AA = Param("AA", 0.1,5,200,10);
CC = 1 - AA;
vEMA = IIR( C, AA, CC);
RE1 = CC*vEMA + Ref(vEMA, -1);
RE2 = (CC^2)*RE1 + Ref(RE1, -1);
RE3 = (CC^4)*RE2 + Ref(RE2, -1);
RE4 = (CC^8)*RE3 + Ref(RE3, -1);
RE5 = (CC^16)*RE4 + Ref(RE4, -1);
RE6 = (CC^32)*RE5 + Ref(RE5, -1);
RE7 = (CC^64)*RE6 + Ref(RE6, -1);
RE8 = (CC^128)*RE7 + Ref(RE7, -1);
output = vEMA - AA*RE8;
Plot(output, "Forward/Reverse EMA", styleLine,0.5,100);
Buy= LLV(output >= 2.5,2);
Sell= LLV(output <= -0.55,2);
Buy=ExRem(Buy,Sell);
Sell=ExRem(Sell,Buy);
Cover=Buy;
Short=Sell;
PlotShapes(IIf(buy,shapeuparrow,shapeNone),colorBrightGreen, 0, Low );
PlotShapes(IIf(sell,shapedownarrow,shapeNone),coloryellow,0,High );
_SECTION_END();