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/08/2018 at 7:31 PM #84444
does 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.
or can you explain in plain english what a buy signal for this system is?
11/08/2018 at 8:06 PM #8444512min1 = MIN(dhigh(0),dhigh(1))min2 = MIN(dhigh(1),dhigh(2))This code above finds the lowest value from the daily high’s, today, yesterday and day before
1tcxLong = high < MIN(min1,min2)This code above checks that the high of the i.e. 10min bar is lower than the lowest value from first code.
My reasoning for this long criteria, is that a previous daily high’s are a selling level, a resistance.
So, if the current high is below that, it has generally speaking a bit of room to increase and therefore also has more chances to make a profit.
11/08/2018 at 8:35 PM #8444612min1 = MIN(dhigh(0),dhigh(1))min2 = MIN(dhigh(1),dhigh(2))This code above finds the lowest value from the daily high’s, today, yesterday and day before
1tcxLong = high < MIN(min1,min2)This code above checks that the high of the i.e. 10min bar is lower than the lowest value from first code.
My reasoning for this long criteria, is that a previous daily high’s are a selling level, a resistance.
So, if the current high is below that, it has generally speaking a bit of room to increase and therefore also has more chances to make a profit.
could you explain in the most simple english what a buy signal for this system is? if i would like to try it manually
11/09/2018 at 10:25 PM #84514Hi, It make some optimisation with time frame 3 minute and 10 minute with the combine william & trailing and the result are very good. In your opinini which time frame is the best ? Thanks
3 minute time frame best result123456sl = 0.94 // % Stoplosspt = 1.41 // % Profit Targetts = 0.35 // % MFETrailing// indicator settignsNOP=15 //number of pointsbest parameters for 10 minutes time frame123456sl = 1.15 // % Stoplosspt = 1.5 // % Profit Targetts = 0.35 // % MFETrailing// indicator settignsNOP=24 //number of points1 user thanked author for this post.
11/10/2018 at 6:19 PM #84549Good results!
You can optimise each timeframe to to smallest details. However I like to compare it with the same basic parameters.
SL 1.0, PT 1.5 and MFE 0.35
Also important. take 200k bars for the 3minute and set the same startdate to the 10 minute timeframe.
Now you compare the same periode, with the same basic parameters.
That’s means only the NOP is left. (number of points difference to dayopen at 9u)
In testing it seemed that the NOP for long can be a bit lower then NOP for short. So you can split them and have better results.
for 3 min. NOP long at 12, NOP short at 15 (i use 3 points incremental)
for 10 min NOP long at 18, NOP short at 21 or 24
1 user thanked author for this post.
11/10/2018 at 8:40 PM #84553Thank you Paul for your strategy.
Probabiliste looks interesting. I was even close to go live but i left them on “incubation” for couple of trades. Will see.
However, instead of Nop in pts, i replaced it by:
// indicator settigns
NOP= (close*0.0022)/pointsizeIt seems more adaptative (IMO).
11/10/2018 at 10:36 PM #84559Thnx for your input.
At the moment the code has an option to use a percentage.
1234567If Usepercentage ThenNopl=(Dayopen/100)*0.15Nops=(Dayopen/100)*0.15ElseNopl=27Nops=25EndifI changed that now so it uses also pointsize.
1234567If Usepercentage ThenNopl=((Dayopen*0.27)/100)/pointsizeNops=((Dayopen*0.25)/100)/pointsizeElseNopl=27Nops=25Endif11/10/2018 at 10:56 PM #84560Here’s an update of the code. If anyone find improvements or other markets plz post!
Attached screenshot of 3 min bar 200k and same period for 10 minutes.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230//-------------------------------------------------------------------------// Main Code : Straddle Dayopen V2.0//-------------------------------------------------------------------------// Test On DAX 30 Cash 10 Minute Timeframe 200k bars or from 1/1/2015// Common RulesDefparam Cumulateorders = FalseDefparam Preloadbars = 1000// On/offExtratradecriteria = 1 // I.e. Long; Only Enters When The Current Bar High Is Lower Then The Lowest Daily High From Today, Yesterday And Day Before.Usepercentage = 0 // The Minimum Difference In Percentage [[1] From Dayopen Or In Points [0] From DayopenMfetrailing = 1 // Mfe Trailing StopWtrailing = 1 // Williams 3 Bar Trailing StopBreakevenstop = 1 // Breakevenstop, Move Stoploss When Position Is In Profit.Excludefirsttwoweeks = 1 // Exclude The First 2 Weeks Of Every Year (Weeknumber 1 And 2)// SettingsPositionsize = 1SL = 1.00 // % StoplossPT = 1.50 // % Profit TargetMFETS = 0.35 // % Mfe Trailing StopBES = 0.35 // % Break Even StopBESMP = 0.05 // % Break Even Stop Minimum ProfitWTSMP = 0.50 // % Williams Trailing Stop Minimum Profit If Mfe Trailing Stop Is Not UsedETD = 0 // Exclude a Trade Day; Sunday = 0If Usepercentage ThenNopl=((Dayopen*0.15)/100)/pointsizeNops=((Dayopen*0.15)/100)/pointsizeElseNopl=24 //number of points longNops=24 //number of points shortEndif// Day & TimeOnce Entertime = 090000Once Lasttime = 100000Once Closetime = 240000 // Greater Then 23.59 Means It Continues Position OvernightOnce Closetimefr=173000If Excludefirsttwoweeks=1 ThenIf Year=2015 And Month=1 And (Day>=1 And Day<=18) ThenNotrading = 1Elsif Year=2016 And Month=1 And (Day>=1 And Day<=24) ThenNotrading = 1Elsif Year=2017 And Month=1 And (Day>=1 And Day<=22) ThenNotrading = 1Elsif Year=2018 And Month=1 And (Day>=1 And Day<=21) ThenNotrading = 1Elsif Year=2019 And Month=1 And (Day>=1 And Day<=20) ThenNotrading = 1ElseNotrading = 0EndifEndifTt1 = Time >= EntertimeTt2 = Time <= LasttimeTradetime = Tt1 And Tt2 and Notrading = 0 And Dayofweek <> ETD// Reset At StartIf Intradaybarindex = 0 ThenLongtradecounter = 0Shorttradecounter = 0Tradecounter = 0Mclong = 0Mcshort = 0Endif// [pc] Position CriteriaPclong = Countoflongshares < 1 And Longtradecounter < 1 And Tradecounter < 1Pcshort = Countofshortshares < 1 And Shorttradecounter < 1 And Tradecounter < 1// [mc] Main CriteriaIf Time = Entertime ThenDayopen=openEndifIf High > Dayopen+nopl ThenMclong=1ElseMclong=0EndifIf Low < Dayopen-nops ThenMcshort=1ElseMcshort=0Endif// [ec] Extra CriteriaIf Extratradecriteria ThenMin1 = Min(Dhigh(0),dhigh(1))Min2 = Min(Dhigh(1),dhigh(2))Max1 = Max(Dlow(0),dlow(1))Max2 = Max(Dlow(1),dlow(2))Eclong = High < Min(Min1,min2)Ecshort = Low > Max(Max1,max2)elseEclong=1Ecshort=1Endif// Long & Short EntryIf Tradetime ThenIf Pclong and Mclong And Eclong ThenBuy Positionsize Contract At MarketLongtradecounter=longtradecounter + 1Tradecounter=tradecounter+1EndifIf Pcshort and Mcshort And Ecshort ThenSellshort Positionsize Contract At MarketShorttradecounter=shorttradecounter + 1Tradecounter=tradecounter+1EndifEndif// Break Even StopIf Breakevenstop ThenIf Not Onmarket ThenNewsl=0EndifIf Longonmarket And close-tradeprice(1)>=((Tradeprice/100)*BES)*pipsize ThenNewsl = Tradeprice(1)+((Tradeprice/100)*BESMP)*pipsizeEndifIf Shortonmarket And Tradeprice(1)-close>=((Tradeprice/100)*BES)*pipsize ThenNewsl = Tradeprice(1)-((Tradeprice/100)*BESMP)*pipsizeEndifIf Newsl>0 ThenSell At Newsl StopExitshort At Newsl StopEndifEndif// Exit Mfe Trailing StopIf Mfetrailing ThenTrailingstop = (Tradeprice/100)*MFETSIf 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 Williams Trailing StopIf Wtrailing ThenCount=1I=0J=i+1Tot=0While Count<4 DoTot=tot+1If (Low[j]>=low[i]) And (High[j]<=high[i]) ThenJ=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 Mfetrailing=0 And Positionperf>WTSMP ThenIf Low[1]>ref And High<ref ThenSell At MarketEndifIf High[1]<ref And Low>ref ThenExitshort At MarketEndifEndifIf Onmarket And Mfetrailing=1 And Priceexit>0 ThenIf High<ref ThenSell At MarketEndifIf Low>ref ThenExitshort At MarketEndifEndifEndif// Exit At ClosetimeIf Onmarket ThenIf Time >= Closetime ThenSell At MarketExitshort At MarketEndifEndif// Exit At Closetime FridayIf Onmarket ThenIf (Currentdayofweek=5 And Time>=closetimefr) ThenSell At MarketExitshort At MarketEndifEndif// Build-in ExitSet Stop %loss SLSet Target %profit PT//graph 0 Coloured(300,0,0) As "Zeroline"//graph (Positionperf*100)coloured(0,0,0,255) As "Positionperformance"11/11/2018 at 9:24 AM #84575Hello, in the end we arrived at the same result. After the post I made the comparisons on 200k starting from the same period for 3 minutes and 0 minutes.
Also I thought of dividing Nops between long and short. The results between 3 minutes and 10 minutes are similar. In your opinion, therefore, is it useful to use time frames 3 minutes or 10 minutes? Thanks11/11/2018 at 9:59 AM #8458311/11/2018 at 11:04 AM #8458411/11/2018 at 11:20 AM #8458511/11/2018 at 11:21 AM #84586@pippo999, yeah real account. 1 contract minimum is about €600 (dax 30 1€), but to cover initial losses you should’ve €1200 capital to be comfortable.
@volpiemanuele. Both are good and tradable. If you look at the profits, I would say they complement each other.1 user thanked author for this post.
11/11/2018 at 11:22 AM #8458711/11/2018 at 6:08 PM #84632Sorry can’t help you Jonas, I tried. But maybe someone else can!
where did you try? have not seen a reply to my comment?
-
AuthorPosts
Find exclusive trading pro-tools on