Stock Portfolio Organizer
The ultimate porfolio management solution.
WiseTrader Toolbox
#1 Selling Amibroker Plugin featuring:
3_średnie, 3_ma for Amibroker (AFL)
This formula is simple system 3 MA (ema, tema, dema, tsf),
signal: buy, sell and stop
regards
RySZARd
Screenshots
Similar Indicators / Formulas
Indicator / Formula
//TimeFrameSet(inHourly); //TimeFrameSet(in15Minute); PositionSize = MarginDeposit = 1; CommissionMode = 1; MA1Length = Optimize("MA fast",Param("MA SZYBKA",27,3,60,1),3,60,1); MA2Length = Optimize("MA medium",Param("MA ŚREDNIA",60,40,135,1),40,135,2); MA3Length = Optimize("MA slow",Param("MA WOLNA",95,40,350,1),50,250,3); XXLength =1; //Optimize("MnoznikMA11",Param("mnoznikMA1",1,0.90,1.1,0.005),0.9,1.1,0.005); ma_type = ParamList("Rodzaj rednich", "TEMA|MA|EMA|DEMA|WMA|TSF|Wilders|LinearReg|Hull", 0); if(ma_type == "Hull") { MA1 = WMA(2*(WMA(C, MA1Length/2))-WMA(C, MA1Length) ,4 ); MA2 = WMA(2*(WMA(C, MA2Length/2))-WMA(C, MA2Length) ,4 ); MA3 = WMA(2*(WMA(C, MA3Length/2))-WMA(C, MA3Length) ,4 ); } if(ma_type == "MA") { MA1 = MA(C,MA1Length); MA2 = MA(C,MA2Length); MA3 = MA(C,MA3Length); } if(ma_type == "LinearReg") { MA1 = LinearReg(C,MA1Length); MA2 = LinearReg(C,MA2Length); MA3 = LinearReg(C,MA3Length); } if(ma_type == "EMA") { MA1 = EMA(C,MA1Length); MA2 = EMA(C,MA2Length); MA3 = EMA(C,MA3Length); } if(ma_type == "DEMA") { MA1 = DEMA(C,MA1Length); MA2 = DEMA(C,MA2Length); MA3 = DEMA(C,MA3Length); } if(ma_type == "WMA") {MA1 = WMA(C,MA1Length); MA2 = WMA(C,MA2Length); MA3 = WMA(C,MA3Length); } if(ma_type == "TSF") { MA1 = TSF(C,MA1Length); MA2 = TSF(C,MA2Length); MA3 = TSF(C,MA3Length); } if(ma_type == "TEMA") { MA1 = TEMA(C,MA1Length); MA2 = TEMA(C,MA2Length); MA3 = TEMA(C,MA3Length); } if(ma_type == "Wilders") { MA1 = Wilders(C,MA1Length); MA2 = Wilders(C,MA2Length); MA3 = Wilders(C,MA3Length); } cond1 = Flip( MA1 < MA2 AND MA1 < MA3 , MA1 > MA2 AND MA1 > MA3 ); cond2 = Flip(MA1 > MA2 AND MA1 > MA3, MA1 < MA2 AND MA1 < MA3); Buy = MA1 > MA2 AND MA1 > MA3 AND Ref(Cond1,-1); Sell = MA1 < MA2 OR MA1 < MA3 ; Short = MA1 < MA2 AND MA1 < MA3 AND Ref(Cond2,-1); Cover = MA1 > MA2 OR MA1 > MA3; Buy = ExRem (Buy,Sell); Sell = ExRem(Sell,Buy); Short = ExRem(Short, Cover); Cover = ExRem(Cover, Short); // Rysuj srednie ShowAverange = ParamToggle( "Pokaż Średnie", "HIDE|SHOW", 1 ); if ( showAverange ) { Plot(MA1, "MA1", colorGreen,styleLine); Plot(MA2, "MA2", colorBlue,styleLine);Plot(MA3, "MA3", colorRed,styleLine); } // _SECTION_BEGIN("price style"); SetChartOptions(0,chartShowArrows|chartShowDates); _N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) Vol " + WriteVal( V, 1.0 ) + " {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) )); Plot( C, "Close", ParamColor("Color", colorBlack ), ParamStyle("Style",styleNoTitle|styleCandle,maskAll) ); _SECTION_END(); _SECTION_BEGIN("strzalki_sygnalne"); //eliminacja powtarzajacych sie sygnalow //Buy = ExRem (Buy,Sell); Sell = ExRem(Sell,Buy); Short = ExRem(Short, Cover); Cover = ExRem(Cover, Short); /////////strzaki na wykresie ShowTriangles = ParamToggle( "Pokaż sygnały", "HIDE|SHOW", 1 ); if ( showTriangles ) { PlotShapes(Buy * shapeUpArrow, colorGreen, 0, Low); PlotShapes(Short * shapeDownArrow, colorRed, 0, High); PlotShapes(Sell * shapeSmallDownTriangle, colorRed, 0, High); PlotShapes(Cover * shapeSmallUpTriangle, colorGreen, 0, Low); } /////////////////// _SECTION_END(); _SECTION_BEGIN("dzwięki alrmu"); ShowDzwiek = ParamToggle( "włącz dźwięk", "HIDE|SHOW", 1 ); if ( showDzwiek ) { AlertIf(Ref(Buy,-1), "SOUND C:\Program Files\Gadu-Gadu\sounds\wiadomość.wav","Price Alert",2,7,0); AlertIf(Ref(Short,-1), "SOUND C:\Program Files\Gadu-Gadu\sounds\wiadomość.wav","Price Alert",2,7,0); AlertIf(Ref(Sell,-1), "C:\\Windows\\Media\\Ding.wav","Price Alert",2,7,0); AlertIf(Ref(Cover,-1), "C:\\Windows\\Media\\Ding.wav","Price Alert",2,7,0); } _SECTION_END();
0 comments
Leave Comment
Please login here to leave a comment.
Back