Wanted: small code snippet for reinvestment
Forums › ProRealTime English forum › ProOrder support › Wanted: small code snippet for reinvestment
- This topic has 68 replies, 7 voices, and was last updated 7 years ago by Nicolas.
-
-
01/12/2018 at 8:33 PM #59285
I stripped this of everything that does not appear to be necessary (no seasonal stuff, no order cumulation, position size always = 1), and the results still look almost to good to be true. Backtest done in tick-by-tick mode.
probably not the holy grail1234567891011121314151617181920212223242526defparam flatafter = 210000defparam flatbefore = 090000cx1 = cci[11]<80cx2 = cci[21]>-90cx3 = Momentum[6](close)>0cx6 = TR(close) >25cx8 = EaseOfMovement[14]<95cx9 = SmoothedStochastic[14,3](close)<95cx10 = PriceOscillator[5,25](close)<0.5cx11 = LinearRegressionSlope[10](close)>-14cx12 = AccumDistr(close)>-0.1cx13 = Chandle [20](close)>-51cx15 = DPO[21](close)>-50cx16 = DPO[21](close)<50IF cx1 and cx8 and cx9 and cx10 and cx12 and cx15 and close < ExponentialAverage[8](close) and (not shortonmarket) Thensellshort 1 CONTRACTS AT MARKETENDIFIF cx2 and cx3 and cx6 and cx11 and cx13 and cx16 and close > ExponentialAverage[8](close) and (not longonmarket) Thenbuy 1 CONTRACT AT MARKETENDIFSet Stop %Loss 1.7Set Target %profit 1.7So, probably it is just a matter of overfitting, because so many different parameters and conditions are used. Stop loss and target profit are both 1.7 % (percent !), so I don’t see a problem here. Short average duration of positions may be a problem, but I am not sure,
01/12/2018 at 8:45 PM #59291Stop loss and target profit are both 1.7 % (percent !)
Aaaah! Well spotted. I need new glasses as I didn’t see the %! Still how often does the market move 1.7% in 7 seconds? Aaaaah! Just spotted my second error – it is a German screen and an s in German is an h in English!
01/12/2018 at 8:47 PM #59292Stop loss and target profit are both 1.7 % (percent !)
Aaaah! Well spotted. I need new glasses as I didn’t see the %! Still how often does the market move 1.7% in 7 seconds?
This is on a 4 hour chart, and stops or targets are rarely reached.
01/12/2018 at 9:14 PM #59294I’ve just tested it (after putting my glasses on) and it does seem incredible – but so many different indicators for longs and so many totally different indicators for shorts rings alarm bells for curve fitting and also the quarterly graph is a lovely bell curve which also rings alarm bells. I’ll shove it on demo as a ‘fun to watch’ I think.
01/12/2018 at 9:19 PM #59297but so many different indicators for longs and so many totally different indicators for shorts rings alarm bells
I guess that’s the point.
01/12/2018 at 9:20 PM #59298I’ll shove it on demo as a ‘fun to watch’ I think.
No I won’t as the DPO indicator is not allowed in automatic trading.
01/12/2018 at 9:26 PM #59299No I won’t as the DPO indicator is not allowed in automatic trading.
Ahh, so this is another point. DPO is like zig zag, it repaints the past, and cannot be used for trading therefore. So forget about the strategy.
01/12/2018 at 9:29 PM #5930001/12/2018 at 9:34 PM #59303English speaking here please!
DPO use future datas, that’s why the equity curve looks so good. We all want to know what the future will be like.
1 user thanked author for this post.
-
AuthorPosts