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.
-
-
07/24/2019 at 5:30 PM #10340607/24/2019 at 5:34 PM #10340807/25/2019 at 8:21 AM #10345407/26/2019 at 2:44 PM #103565
@winnie37 I would not be confident to open a position manually, because it’s hard to manage and simulate automatic trading results. Maybe luck was on your side that day 🙂
extra criteria on / off made a difference between win and loss. To me an example that running different versions is better that 1 version with money-management, but not perhaps in all scenarios.
About the new version, I had to revert back to v3 because of unexpected result in live trading at the opening. So a.t.m. V3 is the latest stable version.
1 user thanked author for this post.
07/26/2019 at 2:50 PM #10356607/26/2019 at 3:05 PM #10356907/26/2019 at 3:10 PM #103570Hi @paul, sorry to bother you but I didn’t understand why you recommand to go back to the V3.
This morning I didn’t have an entry and I didn’t see anything strange. Thanks for your reply if you have time. And good luck with your other strategies (when I see the quality of what your share, I can’t imagine what you do on your own 🙂 )
07/26/2019 at 3:43 PM #103573Hi Gregg, V3 is the latest version I published. For you guys there’s nothing to revert back to. Posted also some settings before to play with.
In the meantime I did put up a few screenshots of tests which had a higher version (3.2), but they are not good enough for release.
08/05/2019 at 8:06 PM #1042321<span lang="en" tabindex="0">Hi Pablo, I am trying to do a backtesting of the DayOpen Straddle v1 and v3 and it gives me an error "exceeds the limit of occurrences for the optimization of walk forward", can you help me please? or someone who knows how to solve it? I am a rookie in this world. Thank you</span>08/05/2019 at 8:13 PM #104234123<span lang="en" tabindex="0">Hi Pablo, I am trying to do a backtesting of the DayOpen Straddle v1 and v3 and it gives me an error "exceeds the limitof occurrences for the optimization of walk forward", can you help me please? or someone who knows how to solve it? I am a rookie in this world.Thank you</span>08/05/2019 at 8:19 PM #104237Hello Josef,
You got this message because you have Prorealtime Complete version. You must lower the number of occurencies from 7 to 5 in your walk forward test to prevent this error.
1 user thanked author for this post.
08/05/2019 at 10:25 PM #104239Hola josef
Recibiste este mensaje porque tienes la versión Prorealtime Complete. Debe reducir el número de ocurrencias de 7 a 5 en su prueba de avance para evitar este error.
First thanks for your help, reducing the occurrences does not affect the reality of backtesting, that is, will it affect the results? If I operate in real when modifying the occurrences will it affect the operation?
08/05/2019 at 10:44 PM #10424208/18/2019 at 10:17 AM #10496908/18/2019 at 11:25 AM #104979Modified the code a bit and tested it on USA 500 with timeframe 30 sec and spread 1.6.
You have very little data in 30 sec, but the graph looks interesting.
USA 500 30 sec123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233//-------------------------------------------------------------------------// Main code : 3 min DAX algo//-------------------------------------------------------------------------//-------------------------------------------------------------------------// USA 500 30 sec spread 1.6//-------------------------------------------------------------------------// Test On DAX 30 Cash 10 Minute Timeframe 200k bars or from 1/1/2015// Common RulesDefparam Cumulateorders = FalseDefparam Preloadbars = 1000// On/offExtratradecriteria = 0 // 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 = 0 // Mfe Trailing StopWtrailing = 0 // Williams 3 Bar Trailing StopBreakevenstop = 0 // Breakevenstop, Move Stoploss When Position Is In Profit.Excludefirsttwoweeks = 0 // Exclude The First 2 Weeks Of Every Year (Weeknumber 1 And 2)// SettingsPositionsize = 0.5SL = 1 // % Stoploss///PT = 1.50 // % Profit TargetMFETS = 4 // % Mfe Trailing StopBES = 0.5 // % Break Even StopBESMP = 0.05 // % Break Even Stop Minimum ProfitWTSMP = 0.5 // % 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=5 //number of points longNops=6 //number of points shortEndif// Day & TimeOnce Entertime = 0930Once 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 SL -
AuthorPosts
Find exclusive trading pro-tools on