// Downloaded From https://www.WiseStockTrader.com //------------------------------------------------------------------------------ // // Formula Name: 3-13-39-ema // Author/Uploader: Abhishek Gupta // E-mail: abhishekgupta10d12@gmail.com // Date/Time Added: 2013-12-17 // Date/Time Updated: 2014-02-14 // Version: 1.1 // Origin: // Keywords: // Level: beginner/medium // Flags: indicator // //------------------------------------------------------------------------------ // // This is just a development of a system I found here: http://debarghyamukherjee.webs.com/3-13-39-ema-technique // into an AFL. // // Also I implemented a simple technique for trailing stop loss borrowed from // http://www.wisestocktrader.com/indicators/3907-profit-trading-system-with-target-and-stoploss // // For more details see the remarks below. // //------------------------------------------------------------------------------ // // Application: Drag & Drop. // // This system uses Stochastic to define the trend and 3/13ema for entry values. // Exit is done on the basis of trailing SL. Stay in trade until SL is hit. // ADX is used to see if there is enough momentum. // Best used on a 15min or greater time frame. // The best use is in trending stocks. // Advice: Do not carry an over-night position without a proper hedge. // // Written by: Abhishek Gupta // Toggle candle visibility if (ParamToggle("Candles", "Show|Hide",0)){ _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", colorDefault ), styleCandle | styleThick ); _SECTION_END(); } _SECTION_BEGIN("Trailing SL"); no = Param( "Swing", 5, 1, 55 ); res = HHV(H,no); sup = LLV(L,no); tsl = IIf(ValueWhen(IIf(C>Ref(res,-1),1,IIf(CRef(res,-1),1,IIf(C Ref(stocK, -1) AND ADX14 > Ref(ADX14, -1) AND ADX14>15; Sell = Cross( tsl, Low); Short = Cross( EMAfast, EMAslow) //AND tsl>High AND stocK < Ref(stocK, -1) AND ADX14 > Ref(ADX14, -1) AND ADX14>15; Cover = Cross( High, tsl); // End Conditions Buy = ExRem(Buy, Sell); Sell = ExRem(Sell, Buy); Short = ExRem(Short, Cover); Cover = ExRem(Cover, Short); BuyPrice = ValueWhen(Buy, Close); ShortPrice = ValueWhen(Short, Close); CoverPrice = ValueWhen(Cover, Close); SellPrice = ValueWhen(Sell, Close); dist = 1.5*ATR(10); for (i=0; i