Nice DAX 30 min algo
Forums › ProRealTime English forum › ProOrder support › Nice DAX 30 min algo
- This topic has 13 replies, 6 voices, and was last updated 6 years ago by victormork.
-
-
11/22/2017 at 10:12 PM #53657
A bit more advanced DAX algo(to be me anyway)
Spread 2p.
100k=ok
12345678910111213141516171819202122232425262728293031323334353637383940414243444546// Main code : DAX 30 min long//-------------------------------------------------------------------------DEFPARAM CumulateOrders=Falseindicator1 = ExponentialAverage[22](close)indicator2 = ExponentialAverage[22](close)c1 = (indicator1 > indicator2[1])indicator3 = AroonUp[15]indicator4 = Aroondown[15]c2 = (indicator3 CROSSES OVER indicator4)indicator100 = closeindicator101 = Supertrend[2,11]c100 = indicator100 > indicator101IF c1 AND c2 AND c100 THENBUY 1 CONTRACTs AT MARKETENDIFSET STOP PLOSS 68trailingstop = 40if not onmarket thenMAXPRICE = 0priceexit = 0endifindicator5 = RSI[4](close)c5 = (indicator5 <5)If longonmarket and c5 thensell at marketendifif longonmarket thenMAXPRICE = MAX(MAXPRICE,close)if MAXPRICE-tradeprice(1)>=trailingstop*pointsize thenpriceexit = MAXPRICE-trailingstop*pointsizeendifendifif onmarket and priceexit>0 thenEXITSHORT AT priceexit STOPSELL AT priceexit STOPendif2 users thanked author for this post.
11/23/2017 at 12:48 AM #53667Lines 5-7 can be written:
123indicator1 = ExponentialAverage[22](close)//indicator2 = ExponentialAverage[22](close)c1 = (indicator1 > indicator1[1])11/23/2017 at 8:52 AM #53688Barney! Well done. So you have optimized your variables from 100k bars ago to the end of December last year? Is that the thing you want us to understand in your first picture? Is this is true, you have indeed validate this In Sample Period in OOS one, it’s a good thing.
11/23/2017 at 11:11 AM #53701Well done Barney. The system is a little bit too long in the market for my liking but apart from that it’s good.
I made a few updates, hope it can help you! Lycka till!
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051// Main code : DAX 30 min long//-------------------------------------------------------------------------DEFPARAM CumulateOrders=Falseindicator1 = ExponentialAverage[22](close)indicator2 = AroonUp[15]indicator3 = Aroondown[15]indicator4 = Supertrend[2,11]indicator5 = RSI[5](close)indicator6 = averagetruerange[15]// LONGb1 = (indicator1 > indicator1[3])b1 = b1 and (indicator2 CROSSES OVER indicator3)b1 = b1 and close > indicator4be1 = (indicator5 <5)// ENTRY AND EXITIF b1 THENBUY 1 CONTRACTs AT MARKETENDIFIf longonmarket and be1 thensell at marketendif// Stop and TargetSET STOP PLOSS (indicator6 * 6.9)*pointsizeSET TARGET PPROFIT (indicator6 * 13.8)*pointsize// trailing stoptrailingstop = (indicator6 * 2.2)*pointsizeif not onmarket thenMAXPRICE = 0priceexit = 0endifif longonmarket thenMAXPRICE = MAX(MAXPRICE,close)if MAXPRICE-tradeprice(1)>=trailingstop*pointsize thenpriceexit = MAXPRICE-trailingstop*pointsizeendifendifif onmarket and priceexit>0 thenEXITSHORT AT priceexit STOPSELL AT priceexit STOPendif11/23/2017 at 11:12 AM #53704Btw you can delete line 50.
11/23/2017 at 11:13 AM #53705Haha sorry! line 49.
11/23/2017 at 11:14 AM #5370611/23/2017 at 11:32 AM #5371211/23/2017 at 11:40 AM #5371411/23/2017 at 11:45 AM #53716I have a question, indeed it looks curve-fitted, but i have noticed that there are different forms of curve-fitting.
Example #1: Some systems shows a TERRIBLE negative shitty results going from start of 200K=> 100K backtest.
Example #2: Others, like this system, shows more or less 0 profit/loss from start of 200K => to where the 100K starts
Example #3: and then theres the ones that stay profitable. For example i created one system on dax 15m that looked very profitable and good in 100K, then i got premium PRT and 200K, and it looked … OK i would say, from 200K start => 100K start. It was not as good as the 100K backtest, but it was more or less an OK smooth line going up, not as steep or good looking as 100K backtest alone but still profitable and decent.
I have personally made every one of these examples 😛
do not have enough experience in this field to make conclusions, but i would guess that example #1, the terrible looking system should be thrown away right? And obviously the example #3 with profitable EQ curve going from 100K to 200K backtesting, is something that you would keep working on right? But as with this system… what is the correct thing to do? I mean, yes it is clearly curve-fitted, but if you change some of the variables and get a decent curve going from start to finish on 200K backktest, should you just assume that youve just curvefitted it more for bigger data? or might it be something? Should you throw away the idea at once? keep working on it? Anyone got any answers here?? 😀
11/24/2017 at 10:44 AM #53818The 100k bars before are also forming a big OOS period. To get a better picture, a complete WFA should be made, with different scenarios: 3,5,9 or more optimized IS periods and OOS validations.. but at the end it is always up to you to make conclusions and invest money in the strategy or not. There are already many topics where discussions are made about what could be considered as robust or not.
11/24/2017 at 11:15 AM #53830@Nicolas I understand what you mean, and i agree, but do you have an opinion on wether to keep working on it or not, if you have example 1 or 2 in my post over?
In other words: if u go from 100K backtrst, to 200K backtest, do you need to see profitable trading all the way? Would you throw away the strategy if its very unprofitable in the past?
11/24/2017 at 11:46 AM #5383911/24/2017 at 2:35 PM #53857@jebus89 I tired this strategy on the Swiss index and it gave a positiv return (obviously not as good as on DAX), so I like to believe there is still something to build on here.
-
AuthorPosts
Find exclusive trading pro-tools on