Forums › ProRealTime English forum › ProOrder support › 1MDAX/RSI/MACD › Reply To: 1MDAX/RSI/MACD
07/22/2018 at 11:10 AM
#76448
I left Longs as per JayKay version, but I added Shorts … see top equity curve / V3.0.
I retained the same strategy … Mean Reverting using RSI and MACD, but I added Multi-TF to the Short side.
Results attached showing Long only, Short only and Longs and Shorts … but bear in mind the Phantom Even Trades when judging the win%.
Please feel free to improve more and post on this Topic.
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 |
// Definition of code parameters DEFPARAM CumulateOrders = False // Cumulating positions deactivated noEntryBeforeTime = 090000 timeEnterBefore = time >= noEntryBeforeTime noEntryAfterTime = 173000 timeEnterAfter = time < noEntryAfterTime // Conditions to enter long positions indicator1 = RSI[14](close) c1 = (indicator1 <= 25) indicator2 = MACDline[12,26,9](close) c2 = (indicator2 <= -10) IF (c1 AND c2) AND timeEnterBefore AND timeEnterAfter THEN BUY 1 CONTRACT AT MARKET ENDIF // Stops and targets If LongonMarket then SET STOP pLOSS 30 SET TARGET pPROFIT 50 endif // GO SHORT Timeframe (5mn) indicator3 = RSI[14](close) c3 = (indicator3 >= 70) Timeframe (1mn) indicator4 = MACDline[12,26,9](close) c4 = (indicator4 >= 5) IF (c3 AND c4) THEN SellShort 1 CONTRACT AT MARKET ENDIF If ShortonMarket Then SET STOP pLOSS 70 //30 SET TARGET pPROFIT 40 //50 Endif |