// Downloaded From https://www.WiseStockTrader.com // By Mr. Abhimanyu Y. Altekar abhimanyu.altekar@gmail.com // 19th September 2024 V1.0 Hor=Param("Horizontal Position",5,20,1200,1); Ver=Param("Vertical Position",70,30,1000,1); IsPlot = ParamToggle ("Plot all Averages", "No|Yes",1); SetChartOptions(0,chartShowDates|chartShowArrows|chartWrapTitle); SetChartBkGradientFill( ParamColor("BgTop", colorLightGrey),ParamColor("BgBottom", colorTan),ParamColor("titleblock",colorLightGrey)); gxs=Param("GRAPH spaceing",5,5,50,5); GraphXSpace = gxs; _SECTION_BEGIN( "Price" ); GraphLabelDecimals = 2; _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", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle(),0,0,0,1 ); ; _SECTION_END(); //5m function xSignal(Tf,Hor,Ver,sTf,isPlot) { TimeFrameSet(TF); e10=EMA(C,10); e20=EMA(C,20); e30=EMA(C,30); TimeFrameRestore(); ex10=TimeFrameExpand( e10, TF,expandLast ); ex20=TimeFrameExpand( e20, TF,expandLast ); ex30=TimeFrameExpand( e30, TF,expandLast ); if(isPlot) { Plot(ex10,"\n"+sTf,colorGreen,styleThick); Plot(ex20,sTf,colorBlue,styleThick); Plot(ex30,sTf,colorOrange,styleThick); } sOK=WriteIf(ex10>ex20 OR ex10ex20 AND ex10>ex30,"Good " ,"Flat" ); sBad=WriteIf(ex10