joshsmi Posted March 8, 2011 Report Share Posted March 8, 2011 _SECTION_BEGIN("Traders Dynamic Index"); ParamRSI = Param("Period RSI", 13, 1, 30, 1); ParamBB = Param("Period BB", 34, 1, 50, 1); ParamDEMA = Param("Period DEMA", 2, 1, 100, 1); ParamSMA = Param("Period SMA", 7, 1, 100, 1); RSI0 = RSI(ParamRSI); BBandTop0 = BBandTop(RSI0, Parambb, 2 ); BBandBot0 = BBandBot(RSI0, Parambb, 2 ); DEMA0 = DEMA(RSI0, Paramdema ); AvgBB = (BBandTop0 + BBandBot0)/2; Plot(DEMA0, "", colorLightGrey, styleThick); Plot(BBandTop0, "", colorTan); Plot(BBandBot0, "", colorTan); Plot(AvgBB, "", colorGold); Plot(MA(DEMA0, Paramsma), "TSL", colorWhite, styleDashed); Color50 = IIf(avgbb > 50, colorBlue, colorRed); Plot(50,"", color50 , styleLine | styleDashed | styleNoLabel); PlotGrid(32, colorLightGrey); PlotGrid(68, colorLightGrey); _SECTION_END(); Quote Link to comment Share on other sites More sharing options...
joshsmi Posted March 8, 2011 Author Report Share Posted March 8, 2011 Noch eine andere Möglichkeit, aber im Prinzip das Selbe.Unterschied ist nur die Berechnung des Volabandes. _SECTION_BEGIN("Traders Dynamic Index"); ParamRSI = Param("Period RSI", 13, 1, 30, 1); ParamSMA = Param("Period Vola Band", 34, 1, 50, 1); ParamDEMA = Param("Period DEMA", 2, 1, 100, 1); ParamSMA2 = Param("Period SMA2", 7, 1, 100, 1); RSI0 = RSI(ParamRSI); StDev0 = StDev(RSI0, ParamSMA); MARSI = MA(RSI0, ParamSMA); DEMA0 = DEMA(RSI0, Paramdema ); UpZone = (MARSI + (1.6185 * StDev0)); DnZone = (MARSI - (1.6185 * StDev0)); MdZone = (UpZone + DnZone)/2; Plot(DEMA0, "DEMA(RSI("+ParamRSI+"))", colorLightGrey, styleThick); Plot(UpZone, "UpZone", colorTan); Plot(DnZone, "DnZone", colorTan); Plot(MdZone, "MBL", colorGold); Plot(MA(DEMA0, Paramsma2),"TSL", colorWhite,styleDashed); Color50 = IIf(MdZone > 50, colorBlue, colorRed); Plot(50,"", color50 , styleLine | styleDashed | styleNoLabel); PlotGrid(32, colorLightGrey); PlotGrid(68, colorLightGrey); _SECTION_END(); Quote Link to comment Share on other sites More sharing options...
Mythos Posted March 10, 2011 Report Share Posted March 10, 2011 MT Teil nach hier abgetrennt. Quote Link to comment Share on other sites More sharing options...
joshsmi Posted March 10, 2011 Author Report Share Posted March 10, 2011 So hier sind die zwei Codes Varianten von oben jeweils als MTF.TF wird in den Parameters per Schieberegler oder Eingabe eingestellt.Mehrfachausführung auf dem Chart natürlich möglich. Einstellung von M1 bis M240. Kann natürlich auch individuell verändert/ausgeweitet werden. Numero uno _SECTION_BEGIN("Traders Dynamic Index"); ParamRSI = Param("Period RSI", 13, 1, 30, 1); ParamBB = Param("Period BB", 34, 1, 50, 1); ParamDEMA = Param("Period DEMA", 2, 1, 100, 1); ParamSMA = Param("Period SMA", 7, 1, 100, 1); TimeFrame = 60 * Param("Time Frame", 15, 1, 240, 1); TimeFrameSet(timeFrame); RSI0 = RSI(ParamRSI); BBandTop0 = BBandTop( RSI0, Parambb, 2 ); BBandBot0 = BBandBot( RSI0, Parambb, 2 ); DEMA0 = DEMA(RSI0, Paramdema ); AvgBB = (BBandTop0 + BBandBot0)/2; Plot(DEMA0,EncodeColor(colorRed) + "Time frame: " + timeFrame/60 +"-minute, " + EncodeColor(colorLightGrey) + "DEMA(RSI("+ParamRSI+"))", colorLightGrey, styleThick); Plot(BBandTop0, "BBTop", colorTan); Plot(BBandBot0, "BBBot", colorTan); Plot(AvgBB,"AvgBB", colorGold); Plot(MA(DEMA0, Paramsma), "TSL", colorWhite,styleDashed); TimeFrameRestore(); Color50 = IIf(avgbb > 50, colorBlue, colorRed); Plot(50,"", color50 , styleLine | styleDashed | styleNoLabel); PlotGrid(32, colorLightGrey); PlotGrid(68, colorLightGrey); _SECTION_END(); Numero due _SECTION_BEGIN("Traders Dynamic Index"); ParamRSI = Param("Period RSI", 13, 1, 30, 1); ParamSMA = Param("Period Vola Band", 34, 1, 50, 1); ParamDEMA = Param("Period DEMA", 2, 1, 100, 1); ParamSMA2 = Param("Period SMA2", 7, 1, 100, 1); TimeFrame = 60 * Param("Time Frame", 15, 1, 240, 1); TimeFrameSet(timeFrame); RSI0 = RSI(ParamRSI); StDev0 = StDev(RSI0, ParamSMA); MARSI = MA(RSI0, ParamSMA); DEMA0 = DEMA(RSI0, Paramdema ); UpZone = (MARSI + (1.6185 * StDev0)); DnZone = (MARSI - (1.6185 * StDev0)); MdZone = (UpZone + DnZone)/2; Plot(DEMA0, EncodeColor(colorRed) + "Time frame: " + timeFrame/60 +"-minute, " + EncodeColor(colorLightGrey) +"DEMA(RSI("+ParamRSI+"))", colorLightGrey, styleThick); Plot(UpZone, "UpZone", colorTan); Plot(DnZone, "DnZone", colorTan); Plot(MdZone, "MBL", colorGold); Plot(MA(DEMA0, Paramsma2),"TSL", colorWhite,styleDashed); TimeFrameRestore(); _SECTION_END(); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.