Forums › ProRealTime English forum › ProOrder support › TANGIER Germany30 Strategy– Time frame 30 minutes › Reply To: TANGIER Germany30 Strategy– Time frame 30 minutes
02/13/2019 at 8:19 PM
#91326
Hi, for what its worth i did something to this as well. I optimized everything “very quick and dirty” meaning i didnt want to spend too much time on this but i wanted to see what i could make of it.
I found that the algo gets better results by removing the time restriction + the c8 buy condition / c34 short condition after that i did the following:
- I split stop loss and target for when a trade is “longonmarket” and “shortonmarket”, optimized the stoploss and targets on data from 2012 – 2015,. The stoploss / targets was optimized before the other variables..
- I optimized on the data that @discomusic did not have. Meaning the “out of sample” period is indeed @discomusic’s “in sample” period (not sure if he has optimized on 100% of his available data or not) so this is obviously a red flag. In other words I have optimized the first 50% of the data, and he has optimized the last 50% of the data.. How much is this curvefit.. no idea.. I honestly like the Out of sample “long only” results and im gonna put it in demo to see how it goes..
- I think that you could optimize this alot “better” than what i did. I used big intervals and i havnt optimized target & stop loss, after the new variables have been optimized.
- I would say “long only” looks better than going long and short, based on my optimizing.
- In the picture included: For the “long only” i just removed the shorting-code. Its the same “long variables” as the “Long and short” variables
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 |
DEFPARAM CumulateOrders = False // Posizioni cumulate disattivate //n1 = 20 (opt 16-24 w/ 2 intervals) //n2 = 70 (not optimized) //n3 = 12 (opt 8-16 w/ 2 intervals) //n4 = 30 (not optimized) //n5 = 50 (opt 50-70 w/ 10 intervals) //n6 = 40 (opt 30-50 w/ 10 intervals) //e1 = 65 (opt 35-75 w/ 10 intervals) //e2 = 75 (opt 35-75 w/ 10 intervals) //e3 = 55 (opt 35-75 w/ 10 intervals) //e4 = 45 (opt 35-75 w/ 10 intervals) indicator1 = RSI[n1](close) // 20 c1 = (indicator1 > n2) // 70 c65=Momentum[n3]>momentum[n3][1] // 12 c66=momentum[n3][1]>momentum[n3][2] IF c1 and c65 and c66 THEN BUY 2 CONTRACT AT MARKET ENDIF indicator2 = RSI[n1](close) c2 = (indicator2 CROSSES UNDER n5) // 60 c13= average[n1]<average[n1][1] IF c2 or c13 THEN SELL AT MARKET ENDIF indicator3 = RSI[n1](close) c3 = (indicator3 CROSSES UNDER n4) // 30 c65=Momentum[n3]<momentum[n3][1] c66=momentum[n3][1]<momentum[n3][2] IF c3 and c65 and c66 THEN SELLSHORT 2 CONTRACT AT MARKET ENDIF indicator5 = RSI[n1](close) c5 = (indicator5 CROSSES OVER n6) // 40 c13= average[n1]>average[n1][1] IF c5 or c13 THEN EXITSHORT AT MARKET ENDIF if longonmarket then SET STOP pLOSS e1 // 65 SET TARGET pPROFIT e2 // 75 endif if shortonmarket then set stop ploss e3 // 55 set target pprofit e4 // 45 endif |