Hello,
I would like to share with you this first strategy that I have just developed. It is based on the Bollinger, RSI and TDI bands largely inspired by Marc website Doctrading (https://www.youtube.com/watch?v=KxTrCc3GmaY) . The results on the EUR/USD pair in 30 minutes look promising.
But it still needs a lot of optimization and hopefully help from you to get it optimized.
See you soon
Michel
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
// Definizione dei parametri DEFPARAM FlatBefore = 070000 DEFPARAM FlatAfter = 230000 DEFPARAM preloadbars = 500 // Numero di contratti Once nlot = 1 // Variabili indicatori Once perBB = 20 Once perRSI = 9 Once RSIUp = 62 Once RSIDn = 28 Once DMTSLm = 14 // DMT StopLine -> average ATR Once DMTSLn = 10 // DMT StopLine -> average price Once lengthRSI = 13 //TDI Once lengthband = 34 //TDI Once lengthrsipl = 2 //TDI Once lengthtradesl = 7 //TDI // Caricare indicatori BBup = BollingerUp[perBB](close) BBDn = BollingerDown[perBB](close) RSI1 = RSI[perRSI](close) // -------- Indicatore DMT StopLine -------------- ATR = AverageTrueRange[DMTSLm](close) avgATR1 = average[DMTSLm](High+ATR) avgATR2 = average[DMTSLm](Low-ATR) AVG1 = average[DMTSLn](High) AVG2 = average[DMTSLn](low) IF close > AVG1 THEN BREAKOUT = 1 ELSIF close < AVG2 THEN BREAKOUT = -1 ENDIF IF BREAKOUT = -1 AND avgATR1 > avgATR1[1] THEN avgATR1 = avgATR1[1] ELSIF BREAKOUT = 1 AND avgATR2 < avgATR2[1] THEN avgATR2 = avgATR2[1] ENDIF IF BREAKOUT = 1 THEN StopLINE = avgATR2 ELSE StopLine = avgATR1 ENDIF // ------- Indicatore TDI --------- r = rsi[lengthrsi](close) ma = average[lengthband](r) offs = (1.6185 * std[lengthband](r)) up = ma+offs dn = ma-offs TDI = average[lengthrsipl](r) TDI2 = average[lengthtradesl](r) // Variabili di lavoro Once cdLong1 = 0 Once cdLong2 = 0 Once cdShort1 = 0 Once cdShort2 = 0 //=============== RICERCA ENTRTY =============== // Long IF NOT LongOnMarket THEN IF not cdLong1 AND close < BBdn AND RSI1 < RSIDn AND TDI < dn THEN cdlong1 = 1 ENDIF IF not cdlong2 THEN cdLong2 = TDI > TDI2 ENDIF IF cdLong1 AND cdLong2 AND StopLine < close THEN BUY nlot CONTRACTS AT MARKET SET STOP LOSS (close - StopLine) cdLong1 = 0 cdLong2 = 0 ENDIF ENDIF //Short IF not ShortOnMarket THEN IF not cdShort1 AND close > BBUp AND RSI1 > RSIUp AND TDI > up THEN cdShort1 = 1 ENDIF IF not cdShort2 THEN cdShort2 = TDI < TDI2 ENDIF IF cdShort1 AND cdShort2 AND StopLine > close THEN SELLSHORT nlot CONTRACTS AT MARKET SET STOP LOSS (StopLine - close) cdShort1 = 0 cdShort2 = 0 ENDIF ENDIF // =============== USCITA TRAD =============== //Long IF LongOnMarket AND close < StopLine THEN SELL AT MARKET ENDIF // Short IF ShortOnMarket AND close > StopLine THEN EXITSHORT AT MARKET ENDIF |
Share this
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.
ProRealTime ITF files and other attachments :PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials
Have been trying this on demo since Monday before deciding whether to go live with it. Using 30 min chart for EUR/USD and so far 100%. I’d be very interested to see how the live market reacts to this algo if anyone has tried it. Thanks for posting it.
I’m sorry, I’ve tried it since November 2012 and it’s bad results.