Automatic trading system DAX 1H mini 1€
Forums › ProRealTime English forum › ProOrder support › Automatic trading system DAX 1H mini 1€
- This topic has 113 replies, 12 voices, and was last updated 6 years ago by
JohnScher.
-
-
02/12/2017 at 12:06 PM #24858
Hello, attached image of systems 1,2,3 on ibex. Spread 3 points. Same take and stop. Works fine, but I do not trust the martingale, it is limited to a maximum of repercussions in the code, but it still seems risky, what do you think? If I replace ordersize * 2 by ordersize * 1.5 it is less risky.
1 user thanked author for this post.
02/12/2017 at 8:17 PM #24906Hi – good work on the Ibex, looks good, though interesting that in this case system 2 seems to perform better than 3. I too am wary of using pure martingale to make up losses. Those periods in June 2014 and 2015 where there is a big draw makes me slightly nervous as the only reason it works is because you recover the losses quite quickly. But if you ever come across a market where you have a run of losses (and you will eventually), it becomes difficult to stomach. Yes, reducing the multiple to 1.5 will help so we should try that. If there was a way in PRT that showed us a histogram of the max consecutive losses to show how often 1,2,3 etc losses in a row occurred we could use that to see what sort of skew it presents, will need to do this in excel though.
Other options could include using the ATR (maybe make the stop/limit a % of the ATR) like Nicolas mentioned earlier, this should in theory also increase profits as the index grows in value. Am not sure quite yet how to incorporate the code but will try later. Also, I am going to have a closer look at those June periods to see if there is a way we can limit draws during events like them, that may yield some info.
02/12/2017 at 8:35 PM #24907I am thinking, maybe there is a middle ground here. We have in our cabinet a variety of systems tested here so we start off with a less risky, more stable equity curve with a low draw ie. chose a low risk system. If you have built up enough capital after a period, you can always switch up to the next “risk system” in the scale. This way, you can afford a historically large draw when it occurs but if not, then you also start to increase the trajectory of the profits. The main aim (in my mind anyway) is to avoid a situation where you incur an unexpectedly large draw at the beginning of your strategy and this approach should help reduce that risk. This is all assuming that people are willing to be patient with the strategies of course, there are no “get rich quick” schemes here and if you go chasing those you are most likely to get burned.
02/12/2017 at 8:48 PM #24909@ manel
To see that you think this solution, instead of multiplying * 2, we simply add 1 contract in case of failure, in case of success we return to 1.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566DEFPARAM CumulateOrders = trueonce ordersize=1// ConditionsMA1 = Average [1]MA2 = Average [2]c1 = Ma1>MA2t1 = time >= 090000t2 = time = 180000d1 =dayofweek = 2d2 = dayofweek = 4capital= strategyprofit+3000n=capital/3000if n<1 thenn=1endifif n>10 thenn=10endifif ordersize>10 thenordersize=10endifindicator13 = MACD[12,26,9](close)c13 = (indicator13 < 30)indicator11 = ExponentialAverage[20](close)c11 = (close >= indicator11)indicator1 = MACDline[12,26,9](close)indicator2 = ExponentialAverage[12](indicator1)c12 = (indicator1 > indicator2)If d1 And t1 and c1 and c11 and c12 and c13 THENif not onmarket thenIF PositionPerf(1) < 0 THENOrderSize = OrderSize+1if ordersize<1 thenordersize=1ENDIFELSIF PositionPerf(1) > 0 THENOrderSize = 1if ordersize<1 thenordersize=1ENDIFendifbuy ordersize+n Contract At MarketEndifIf d2 and t2 thensell at marketendifendifSet Stop Ploss 50set target pprofit 5002/12/2017 at 9:53 PM #24911thanks for ibex .
why not manage ” n ” with ATR daily ?
i mean atr of last days .
or other volatility indicator ….
or maybe :
n = max ( 1 , (round ( atr[10] / 2 ))
for example .
more volatility increase ” n ”
less volatility reduce ” n”
02/13/2017 at 8:38 PM #24998Hi Raul – I’ve done a test of the above code (called it System 4 as I think it’s worth keeping for the future) on the Ibex with a 3pt spread. I think this is the sort of idea we can work with and develop as it is definitely less risky than the rest. See results attached. I have done a backtest as far as PRT will allow which is from 2001 just to get an idea of how effective these systems are over the long run. Be aware that this is on the Eur 2 mini contract, 1hr, with tick by tick off.
1)It does not start making any money until 2011, so 10 yrs of zero profits.
2)However, all the other 3 systems lose 100% of their capital at some point before 2008, so they do not even survive 10yrs
3)During those barren 10yrs, the draw is only 22%, which is acceptable.
4) Overall the draw is 35% which I think is quite high but not disastrous
5) Zero bar totals are 25% of the total trades and a similar % of the total profits (+8.2k) so not too bad even if we ignore these and in line with other results we’ve had before.
6) Performance is a bit erratic and not consistent as the years go onOverall, this risk reducing system does do what it is supposed to – i.e survives a big draw in pretty much all market conditions. It may not be ideally suitable for the ibex though but this (or a revised version of it) is on the right track in my opinion.
02/13/2017 at 9:10 PM #2500302/13/2017 at 9:10 PM #25004I have backtested last 5yrs of Ibex with tick by tick turned on to produce more accurate results and it comes to the same conclusion – the draw of System 4 is the least @ 34% compared to the rest so it has reduced the risk as expected.
02/13/2017 at 9:24 PM #2501002/13/2017 at 9:31 PM #25011Here you go. Dax 1hr, System 4 with 1pt spread, over 10yrs. Looks pretty decent with only 9% draw. Only starts performing from 2012 though, prior to that the first 5yrs were pretty flat. Zero bars totalled net -378 (ie very small, no adj really needed to overall profit results).
02/13/2017 at 9:37 PM #25014And here is the comparison of system 4 with system 3 (which is our preferred one for the dax). As expected, the results are very similar but the position scaling of system 3 means that the overall profits are more than double but the draw is almost the same (8% vs 9%).
02/13/2017 at 9:43 PM #25018I think next step is to perhaps code a strategy incorporating the ATR as suggested by Nicolas and Paris and see if that throws up any more interesting nfo.
In the meantime, I am going to go live with System 3 on Dax and CAC from tom as since it only trades on Tuesdays, we have limited opportunity to test in live conditions as it is. Will keep an eye out for any discrepancies between live and testing also and post back.
02/13/2017 at 10:38 PM #25019hi guys
yes atr can offer a fast indicator of seasonality …..
i mean low atr , low volatility
high atr ,high volatility
always in august there is no volatiliy , but if we for some reason have volatility , a high atr will tell us . better than statistics ….
02/13/2017 at 10:50 PM #25021we have two ways to study it
high volatility —-> we reduce n and low volatility —->we increase n
but also
high volatility —-> we increase n and low volatility —-> we reduce n
and compare the results .
no idea what will have best results and if it will make a difference .
02/13/2017 at 11:45 PM #250221234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980DEFPARAM CumulateOrders = trueonce ordersize=1// ConditionsMA1 = Average [1]MA2 = Average [2]c1 = Ma1>MA2t1 = time >= 090000t2 = time = 180000d1 =dayofweek = 2d2 = dayofweek = 4capital= strategyprofit+3000n=capital/3000if n<1 thenn=1endifif n>10 thenn=10endifif ordersize>16 thenordersize=16endifindicator111 = AverageTrueRange[17](close)c111 = (indicator111 > 20)c1111 = (indicator111 < 20)if c111 thennn=5endifif c1111 thennn=0endifindicator13 = MACD[12,26,9](close)c13 = (indicator13 < 30)indicator11 = ExponentialAverage[20](close)c11 = (close >= indicator11)indicator1 = MACDline[12,26,9](close)indicator2 = ExponentialAverage[12](indicator1)c12 = (indicator1 > indicator2)If d1 And t1 and c1 and c11 and c12 and c13 THENif not onmarket thenIF PositionPerf(1) < 0 THENOrderSize = OrderSize*2if ordersize<1 thenordersize=1ENDIFELSIF PositionPerf(1) > 0 THENOrderSize = 1if ordersize<1 thenordersize=1ENDIFendifbuy ordersize+n+nn Contract At MarketEndifIf d2 and t2 thensell at marketendifendifSet Stop Ploss 50 // from Tradeset target pprofit 50 -
AuthorPosts
Find exclusive trading pro-tools on