// Downloaded From https://www.WiseStockTrader.com prev=AMA2(C,1,0); d=IIf(C>Ref(Max(Max(H,Ref(H,-20)),Max(Ref(H,-10),Ref(H,-15))),-1),Min(Min(L,Ref(L,-20)),Min(Ref(L,-10),Ref(L,-15))), IIf(CRef(state,-1); ss=stateRef(res,-1),1,IIf(CMDI(10)AND Signal(29)PDI(20)AND Signal(29)>MACD(13); Plot( 2, /* defines the height of the ribbon in percent of pane width */"ribbon", IIf( uptrend, colorGreen, IIf( downtrend, colorRed, 0 )), /* choose color */ styleOwnScale|styleArea|styleNoLabel, -0.5, 100 ); _SECTION_END(); //d = Close > Ref( ChandelierHL(ATR(3),20), -1); //e =Close < Ref( ChandelierHL(ATR(3),20), -1); //f = Close < Ref( ChandelierHL(ATR(3),20), -1); //g = Close > Ref( ChandelierHL(ATR(3),20), -1); Buy = s AND a AND uptrend ; Short = ss AND b AND downtrend ; Sell = ss AND b AND downtrend ; Cover = s AND a AND uptrend ; Buy=ExRem(Buy,Sell); Sell=ExRem(Sell,Buy); Cover=ExRem(Cover,Short); Short=ExRem(Short,Cover); Filter=Buy OR Sell; Filter= Cover OR Short; AddColumn( Buy, "Buy", 1); AddColumn(Sell, "Sell", 1); AddColumn(Close,"Close",1.2); AddColumn(Volume,"Volume",1.0); _SECTION_BEGIN("Volume"); Plot( Volume, _DEFAULT_NAME(), ParamColor("Color", colorLavender ), styleNoTitle | ParamStyle( "Style", styleHistogram | styleOwnScale | styleThick | styleNoLabel, maskHistogram ), 2 ); _SECTION_END(); // Plot the Buy and Sell arrows. shape = Buy * shapeUpArrow + Sell * shapeDownArrow; PlotShapes(shape, IIf(Buy,colorGreen,colorRed), 0, IIf(Buy,Low,High)); Plot(supres,"Swing",colorYellow,styleStaircase); SetChartBkGradientFill( ParamColor("BgTop", ColorRGB( 172,172,172 )), ParamColor("BgBottom", ColorRGB( 172,172,172 )),ParamColor("titleblock",ColorRGB( 172,172,172 ))); GraphXSpace = 5; _SECTION_BEGIN("MA1"); P = ParamField("Price field",-1); Periods = Param("Periods", 15, 2, 300, 1, 10 ); Plot( MA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") ); _SECTION_END(); _SECTION_BEGIN("MA3"); P = ParamField("Price field",-1); Periods = Param("Periods", 15, 2, 300, 1, 10 ); Plot( MA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") ); _SECTION_END();