Strategy DayOpen Straddle for DAX
Forums › ProRealTime English forum › ProOrder support › Strategy DayOpen Straddle for DAX
- This topic has 241 replies, 39 voices, and was last updated 3 years ago by Monobrow.
-
-
11/04/2018 at 2:17 PM #84123
Hi,
This strategy is the DAX-open straddle which is posted in the library as DayOpen Straddle for DAX 3-minute timeframe.
It’s based on the idea, that while trading is possible 24/7, the big institutions start their day at 9u.
Here’s more info
https://en.wikipedia.org/wiki/DAX
That’s why I took 9u am as start and made it a trade only in the first hour.
At 9’ am the strategy defines the open and buys x points above or sellshort x points below, whichever comes first.
The assumption is, that once it’s opened, there is high probability that it continues at least x points in that direction.
To make it work, there had to be added extra criteria, which are important.
i.e. For a long position, the (current bar) high has to be lower than the lowest daily high up to 2 days back. If that’s the case, the index has room to increase.
(downside is that when there’s a continues rally, you don’t get in)
While it’s mentioned for the 3min bar, the focus should be on the 10- or 15-min bars.
In my testing, on both timeframes, I start from 1 January 2015.
I didn’t expect these kinds of results! Have a look and if you have any idea’s how to improve or find other markets please post!
(pictures posted are with 0.6SL, 0.4MFE and no PT) (NOP 30 for 15min, NOP25 for 10min)
Cheers,
Paul
11/04/2018 at 10:28 PM #8413511/05/2018 at 6:47 PM #84198Interesting results GraHal! Ofcourse i’am curious which variables you used.
Meantime I coded that holidays where excluded, with the day before and after the holiday.
Only focussed on the holidays which repeat every year.
If you can exclude them, it’s easy swap around and only display the holidays which are traded.
It isn’t worth it to include this code. Since results are slightly above 50 % winchance and with marginal profit.
11/05/2018 at 9:11 PM #84210the code to combine Williams 3 bar trailing stop with MFE trailing stop
MFETrailing=1
WTrailing=1
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263// MFETrailingif MFETrailing thentrailingstop = (tradeprice/100)*tsif not onmarket thenMAXPRICE = 0MINPRICE = closepriceexit = 0endifif longonmarket thenMAXPRICE = MAX(MAXPRICE,close)if MAXPRICE-tradeprice(1)>=trailingstop*pipsize thenpriceexit = MAXPRICE-trailingstop*pipsizeendifendifif shortonmarket thenMINPRICE = MIN(MINPRICE,close)if tradeprice(1)-MINPRICE>=trailingstop*pipsize thenpriceexit = MINPRICE+trailingstop*pipsizeendifendifIf onmarket and WTrailing=0 and priceexit>0 thensell at marketexitshort at marketendifendif// exit larry williamsIf WTrailing and MFETrailing thencount=1i=0j=i+1tot=0while count<4 dotot=tot+1if (low[j]>=low[i]) and (high[j]<=high[i]) then//inside barj=j+1elsecount=count+1i=i+1J=i+1endifwendbasso=lowest[tot](low)alto=highest[tot](high)if close>alto[1] thenref=bassoendifif close<basso[1] thenref=altoendifif onmarket and priceexit>0 thenif high<ref thensell at marketendifIf low>ref thenexitshort at marketendifendifendif11/05/2018 at 9:32 PM #84211Thank you Paul for sharing your latest good ideas!
i’am curious which variables you used.
Re my results posted above …
For v1.0 – variable values I used
1234567sl = 0.9 // % Stoplosspt = 0.40 // % Profit Targetts = 0.35 // % MFETrailing// indicator settignsNOP=9 //15//number of pointsTimeOpen=080000For v1.1 – variable values I used
1234567sl = 0.9 // % Stoplosspt = 0.40 // % Profit Targetts = 0.35 // % MFETrailing// indicator settignsNOP=36 //15//number of pointsTimeOpen=080000My TimeOpen is set at 080000 because I am in the UK … 1 hour behind you in the Netherlands.
11/06/2018 at 3:45 AM #84224I too found that the stoploss 0f 0.6 is too small and set it to 1%. A profit target at 1.5%.
Also tested lower timesframes but in the end settled on 10min. because of the number trades, about 400 trades in 4 years.
Now it include the MFE with williams 3 bar trailing stop and a break even stop.
Compared new code left to original code right with same parameters. Still working on it.
1 user thanked author for this post.
11/06/2018 at 4:41 PM #8424411/07/2018 at 9:59 AM #84300Can I have the latest version of the strategy in order to improve it ?
Thanks
11/07/2018 at 10:16 AM #84302This strategy is the DAX-open straddle which is posted in the library as DayOpen Straddle for DAX 3-minute timeframe.
@xpiga and @volpiemanuele
Latest full working System is in the Library, but please also help Paul with improvements … for example, he has posted a Trailing Stop idea to be added in, tested and improved (maybe?) in the post below
the code to combine Williams 3 bar trailing stop with MFE trailing stop
11/07/2018 at 3:27 PM #84334Still working on it.. A problem though,
I want to skip the first 2 weeks every year since those two are bad for trading.
Does PRT support week-numbers perhaps?
I want to make it optional to exclude those days.
How should I code this most efficiently?
If you add the code below, and add trading=0 to the buy criteria, it doesn’t work.
1234567891011121314151617181920212223242526//skip first two weeks of the year (weeknumber 1 and 2)IF YEAR=2015 AND MONTH=1 AND (DAY>=1 AND DAY<=10) THENTRADING = 1ELSETRADING = 0ENDIFIF YEAR=2016 AND MONTH=1 AND (DAY>=1 AND DAY<=16) THENTRADING = 1ELSETRADING = 0ENDIFIF YEAR=2017 AND MONTH=1 AND (DAY>=1 AND DAY<=14) THENTRADING = 1ELSETRADING = 0ENDIFIF YEAR=2018 AND MONTH=1 AND (DAY>=1 AND DAY<=13) THENTRADING = 1ELSETRADING = 0ENDIFIF YEAR=2019 AND MONTH=1 AND (DAY>=1 AND DAY<=12) THENTRADING = 1ELSETRADING = 0ENDIF11/07/2018 at 4:18 PM #84340You can do something like this to convert YYYYMMDD to MMDD and then make decisions based on that.
1234567mmdd = date - (round(date /10000) * 10000)if mmdd >= 0101 and mmdd <=0114 thentradeok = 0elsetradeok = 1endif2 users thanked author for this post.
11/07/2018 at 7:18 PM #84353That worked great Vonasi.
Because the beginning of several years had bad trades, with this code it was easy to optimise and skip the first x days of the year.
Also found wrong with my code.
123456789101112131415IF SkipFirstTwoWeeks=1 thenIF YEAR=2015 AND MONTH=1 AND (DAY>=1 AND DAY<=18) THENTRADING = 1ELSIF YEAR=2016 AND MONTH=1 AND (DAY>=1 AND DAY<=24) THENTRADING = 1ELSIF YEAR=2017 AND MONTH=1 AND (DAY>=1 AND DAY<=22) THENTRADING = 1ELSIF YEAR=2018 AND MONTH=1 AND (DAY>=1 AND DAY<=21) THENTRADING = 1ELSIF YEAR=2019 AND MONTH=1 AND (DAY>=1 AND DAY<=20) THENTRADING = 1ELSETRADING = 0ENDIFENDIF11/07/2018 at 11:20 PM #84372Please can you post the complete strategy with the william three bar trailing ? Thanks
11/08/2018 at 12:19 AM #8437411/08/2018 at 11:59 AM #84414does not look like this is correct
Make it easier for us … please post the snippet of code you are referring to and a link to the post in which that snippet appears.
1 user thanked author for this post.
-
AuthorPosts
Find exclusive trading pro-tools on