// Downloaded From https://www.WiseStockTrader.com _SECTION_BEGIN("MA Difference 20 Period"); //------------------------------------------------------------------------------ // Note: This formula is not my creation I found from my friends which work fine. // T=20; /*Time Period for MA*/ // // KMA=((C-MA(C,T))/MA(C,T))*100; // // GRAPH0=KMA; // // GRAPH0STYLE=2+4; // // GRAPH0BARCOLOR=iif(KMA>0,5,4); // // graphxspace=5; // // title=name()+" "+date()+" The Close is // "+writeval(abs(KMA),format=1.2)+"%"+writeif(KM A>0, " above"," below")+" the // 20 period MA"; // // Mark Grid lines: // // Level 0 // // Limits // // Show dates // // Percent // // Middle // //------------------------------------------------------------------------------ /*MA Diff 20*/ T=20; /*Time Period for MA*/ KMA=((C-MA(C,T))/MA(C,T))*100; Graph0=KMA; Graph0Style=2+4; Graph0BarColor=IIf(KMA>0,5,4); GraphXSpace=5; Title=Name()+" "+Date()+" The Close is "+WriteVal(abs(KMA),format=1.2)+"%"+WriteIf(KMA>0, " above"," below")+" the 13 period MA"; _SECTION_END(); _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", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); _SECTION_END(); //------------------------------------------------------------------------------ // _SECTION_BEGIN("ZIG - Zig"); P = ParamField( "Price field" ); change = Param("% change",5,0.1,25,0.1); Plot( Zig(P, change), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") ); _SECTION_END(); // Paste the code below to your price chart somewhere and green ribbon means both // both MACD and ADX trending up so if the red ribbon shows up the MACD and the ADX // are both trending down. _SECTION_BEGIN("trending ribbon"); uptrend=PDI()>MDI()AND Signal()PDI()AND Signal()>MACD(); 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(); _SECTION_BEGIN("EMA"); P = ParamField("Price field",-1); Periods = Param("Periods", 15, 2, 300, 1, 10 ); Plot( EMA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") ); _SECTION_END(); _SECTION_BEGIN("MACD Exploration"); r1 = Param( "Fast avg", 12, 2, 200, 1 ); r2 = Param( "Slow avg", 26, 2, 200, 1 ); r3 = Param( "Signal avg", 9, 2, 200, 1 ); Z=Param("zig",1,0,10,0.1); Cond1 = Cross(MACD(r1,r2),Signal(r1,r2,r3)); Cond3 = Zig(C,z)>Ref(Zig(C,z),-4); Buy = Cond1 AND Cond3; Cond4 = Cross(Signal(r1,r2,r3),MACD(r1,r2)); Cond6 = Zig(C,z)