Strategy DayOpen Straddle for DAX

Viewing 15 posts - 181 through 195 (of 242 total)
  • Author
    Posts
  • #103406 quote
    Paul
    Participant
    Master

    Thanks!

    few things; enable spread, set initial capital to the same as I used or visa versa.

    #103408 quote
    AE
    Participant
    Senior

    it looks really good, right?

    more ideas?

    #103454 quote
    winnie37
    Participant
    Veteran

    Missed the entry this morning (system has stopped). Is there a way to manually catch the position as i quickly receive the mail for stopping system, and then running the system to close normally the position?

    #103565 quote
    Paul
    Participant
    Master

    @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.

    winnie37 thanked this post
    #103566 quote
    AE
    Participant
    Senior

    Thanks Paul!

    When do you think you will publish your new version?

    Thanks

    #103569 quote
    Paul
    Participant
    Master

    not soon, a.t.m. I leave it at V3 and see how it goes. Working on other strategies now.

    #103570 quote
    Gregg
    Participant
    Average

    Hi @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 🙂  )

    #103573 quote
    Paul
    Participant
    Master

    Hi 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.

    #104232 quote
    josef1604
    Participant
    Senior
    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
    Captura.jpg Captura.jpg
    #104234 quote
    josef1604
    Participant
    Senior
    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
    Captura-1.jpg Captura-1.jpg
    #104237 quote
    Magifina
    Participant
    Master

    Hello 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.

    josef1604 thanked this post
    #104239 quote
    josef1604
    Participant
    Senior

    Hola 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?

    #104242 quote
    josef1604
    Participant
    Senior

    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?

    #104969 quote
    Jaykay
    Participant
    Senior
    Any thoughts on the recent drawdown of V3?
    #104979 quote
    Stefanb
    Participant
    Senior
    Modified 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.    
    //-------------------------------------------------------------------------
    // 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 Rules
    Defparam Cumulateorders = False
    Defparam Preloadbars = 1000
     
    // On/off
    Extratradecriteria   = 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 Dayopen
    Mfetrailing          = 0 // Mfe Trailing Stop
    Wtrailing            = 0 // Williams 3 Bar Trailing Stop
    Breakevenstop        = 0 // Breakevenstop, Move Stoploss When Position Is In Profit.
    Excludefirsttwoweeks = 0 // Exclude The First 2 Weeks Of Every Year (Weeknumber 1 And 2)
     
    // Settings
    Positionsize = 0.5
    SL    = 1 // % Stoploss
    ///PT    = 1.50 // % Profit Target
    MFETS = 4 // % Mfe Trailing Stop
    BES   = 0.5 // % Break Even Stop
    BESMP = 0.05 // % Break Even Stop Minimum Profit
    WTSMP = 0.5 // % Williams Trailing Stop Minimum Profit If Mfe Trailing Stop Is Not Used
    ETD   = 0    //   Exclude a Trade Day; Sunday = 0
    If Usepercentage Then
    Nopl=((Dayopen*0.15)/100)/pointsize
    Nops=((Dayopen*0.15)/100)/pointsize
    Else
    Nopl=5 //number of points long
    Nops=6 //number of points short
    Endif
     
    // Day & Time
    Once Entertime = 0930
    Once Lasttime  = 100000
    Once Closetime = 240000 // Greater Then 23.59 Means It Continues Position Overnight
    Once Closetimefr=173000
     
    If Excludefirsttwoweeks=1 Then
    If Year=2015 And Month=1 And (Day>=1 And Day<=18) Then
    Notrading = 1
    Elsif Year=2016 And Month=1 And (Day>=1 And Day<=24) Then
    Notrading = 1
    Elsif Year=2017 And Month=1 And (Day>=1 And Day<=22) Then
    Notrading = 1
    Elsif Year=2018 And Month=1 And (Day>=1 And Day<=21) Then
    Notrading = 1
    Elsif Year=2019 And Month=1 And (Day>=1 And Day<=20) Then
    Notrading = 1
    Else
    Notrading = 0
    Endif
    Endif
     
    Tt1 = Time >= Entertime
    Tt2 = Time <= Lasttime
    Tradetime = Tt1 And Tt2 and Notrading = 0 And Dayofweek <> ETD
     
    // Reset At Start
    If Intradaybarindex = 0 Then
    Longtradecounter = 0
    Shorttradecounter = 0
    Tradecounter = 0
    Mclong = 0
    Mcshort = 0
    Endif
     
    // [pc] Position Criteria
    Pclong  = Countoflongshares < 1 And Longtradecounter < 1 And Tradecounter < 1
    Pcshort = Countofshortshares < 1 And Shorttradecounter < 1 And Tradecounter < 1
     
    // [mc] Main Criteria
    If Time = Entertime Then
    Dayopen=open
    Endif
     
    If High > Dayopen+nopl Then
    Mclong=1
    Else
    Mclong=0
    Endif
     
    If Low < Dayopen-nops Then
    Mcshort=1
    Else
    Mcshort=0
    Endif
     
    // [ec] Extra Criteria
    If Extratradecriteria Then
    Min1 = 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)
    else
    Eclong=1
    Ecshort=1
    Endif
     
    // Long & Short Entry
    If Tradetime Then
    If Pclong and Mclong And Eclong Then
    Buy Positionsize Contract At Market
    Longtradecounter=longtradecounter + 1
    Tradecounter=tradecounter+1
    Endif
    If Pcshort and Mcshort And Ecshort Then
    Sellshort Positionsize Contract At Market
    Shorttradecounter=shorttradecounter + 1
    Tradecounter=tradecounter+1
    Endif
    Endif
     
    // Break Even Stop
    If Breakevenstop Then
    If Not Onmarket Then
    Newsl=0
    Endif
    If Longonmarket And close-tradeprice(1)>=((Tradeprice/100)*BES)*pipsize Then
    Newsl = Tradeprice(1)+((Tradeprice/100)*BESMP)*pipsize
    Endif
    If Shortonmarket And Tradeprice(1)-close>=((Tradeprice/100)*BES)*pipsize Then
    Newsl = Tradeprice(1)-((Tradeprice/100)*BESMP)*pipsize
    Endif
    If Newsl>0 Then
    Sell At Newsl Stop
    Exitshort At Newsl Stop
    Endif
    Endif
    
    
    
    
     
    // Exit Mfe Trailing Stop
    If Mfetrailing Then
    Trailingstop = (Tradeprice/100)*MFETS
    If Not Onmarket Then
    Maxprice = 0
    Minprice = Close
    Priceexit = 0
    Endif
    If Longonmarket Then
    Maxprice = Max(Maxprice,close)
    If Maxprice-tradeprice(1)>=trailingstop*pipsize Then
    Priceexit = Maxprice-trailingstop*pipsize
    Endif
    Endif
    If Shortonmarket Then
    Minprice = Min(Minprice,close)
    If Tradeprice(1)-minprice>=trailingstop*pipsize Then
    Priceexit = Minprice+trailingstop*pipsize
    Endif
    Endif
    If Onmarket And Wtrailing=0 And Priceexit>0 Then
    Sell At Market
    Exitshort At Market
    Endif
    Endif
     
    // Exit Williams Trailing Stop
    If Wtrailing Then
    Count=1
    I=0
    J=i+1
    Tot=0
    While Count<4 Do
    Tot=tot+1
    If (Low[j]>=low[i]) And (High[j]<=high[i]) Then
    J=j+1
    Else
    Count=count+1
    I=i+1
    J=i+1
    Endif
    Wend
     
    Basso=lowest[tot](Low)
    Alto=highest[tot](High)
     
    If Close>alto[1] Then
    Ref=basso
    Endif
    If Close<basso[1] Then
    Ref=alto
    Endif
     
    If Onmarket And Mfetrailing=0 And Positionperf>WTSMP Then
    If Low[1]>ref And High<ref Then
    Sell At Market
    Endif
    If High[1]<ref And Low>ref Then
    Exitshort At Market
    Endif
    Endif
     
    If Onmarket And Mfetrailing=1 And Priceexit>0 Then
    If High<ref Then
    Sell At Market
    Endif
    If Low>ref Then
    Exitshort At Market
    Endif
    Endif
    Endif
     
    // Exit At Closetime
    If Onmarket Then
    If Time >= Closetime Then
    Sell At Market
    Exitshort At Market
    Endif
    Endif
     
    // Exit At Closetime Friday
    If Onmarket Then
    If (Currentdayofweek=5 And Time>=closetimefr) Then
    Sell At Market
    Exitshort At Market
    Endif
    Endif
     
    // Build-in Exit
    Set Stop %loss SL
    
    usa500.jpg usa500.jpg
Viewing 15 posts - 181 through 195 (of 242 total)
  • You must be logged in to reply to this topic.

Strategy DayOpen Straddle for DAX


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Paul @micky75d Participant
Summary

This topic contains 241 replies,
has 39 voices, and was last updated by Monobrow
5 years, 1 month ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 11/04/2018
Status: Active
Attachments: 100 files
Logo Logo
Loading...