Dax intraday scalping strategy

Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
    Posts
  • #24941 quote
    gforton
    Participant
    Average

    Hello fellow traders,

    I have been monitoring this wonderful site for nearly one year now, admired the work of a number of experienced and creative minds.

    I would now like to share a piece of code with out that my wife, Dominique, and I have developed.

    We have tried the code live since January 6th on te DAX 1 minute and it has generated 260 Euros with a DAX mini 1 Euro CFD system, trading long only. I admit that I have aborted two trades going the wrong way manually.
    The code relies on the crossing of linear regression lines, augmented with a factor a or b to define the steepness or angle of the crossing (the steeper, the more bullish),
    combined with RSI and the Schaff Trend Cycle Index. We have also tried other indices for trent, such as the TDI, the ‘Bluster DAX’ and a lot of others, but the Schaff Trend Cycle Index in our opinion performs best.

    The code is designed to take whatever profit as soon as it get’s later than 17.45, provided that we are making any profit. This is to avoid higher spreads. This codes has been tested using a spread of 0,8, which is normal DAX spread during the office hours. We specifically don’t want to go overnight, although it as happened.

    All parameters have been optimized for the last 6 weeks, which have been rather annoying, given the horizontal progression of the DAX, but that’s life.

    We also have a ‘short’ version of this code, but it doesn’t work as good.

    We have also tried to combine our entry with CTFA’s grid trading and money managing strategy (congratulations on this one, by the way), but we have found that a simple take profit and stop loss renders the most profit. Perhaps you can do it.

    So, here it is. We hope that you will be able to improve this code and -who knows- combine with an efficient short version and/or money management strategy.

    Greetings from the ‘hell hole’ Belgium. “It’s tremendous”. Time zone is GMT +1

    Glen

    //-------------------------------------------------------------------------
    // Main code : DAX DOMI LONG 03/02/2017
    //-------------------------------------------------------------------------
    DEFPARAM CumulateOrders = true
    
    // Definition of indicators
    
    purple = LinearRegression[7](close)
    blue = LinearRegression[10](close)
    yellow = LinearRegression[40] (close)
    
    a = 1
    b = 0
    
    indicator1 = RSI[31](close)
    indicator2 = time
    
    
    // Schaff Trend Cycle
    MCD = WilderAverage[20] - WilderAverage[50]
    ST =( MCD-LOWEST[3] (MCD) )/(HIGHEST[3] (MCD)-LOWEST[3] (MCD) )*100
    STC = WilderAverage [round(3/2)] (ST)
    
    // Conditions to enter long positions
    
    c1 = (purple > (blue + a))
    c2 = (close > (blue + b))
    c3 = (close > close[1])
    c4 = (blue > blue[5])
    c5 = CountOfPosition <=3
    c6 = (indicator1 < 70)
    c7 = (indicator1 > 49)
    c8 = (indicator2 > 080000)
    c9 = (indicator2 < 161500)
    c10 = STC > 27
    c11= STC > STC [5]
    
    
    
    
    IF c1 AND c2  AND c3 AND c4 AND c5 AND c6 AND c7 AND c8 AND c9 AND c10 AND c11 THEN
    BUY 1 CONTRACT AT MARKET
    ENDIF
    
    
    IF LONGONMARKET AND (time > 174500) AND (PositionPerf > 0) THEN
    SELL AT MARKET
    ENDIF
    
    IF LONGONMARKET AND (yellow > (purple + 20)) THEN
    SELL AT MARKET
    ENDIF
    
    // Stops and targets
    SET TARGET pPROFIT 25
    SET STOP pLOSS 135
    GraHal thanked this post
    #24944 quote
    Nicolas
    Keymaster
    Master

    Hello Glen and Dominique !
    I know well Belgium, and living there is not like living in an “hellhole” 🙂
    You are right, it’s been almost a year since the website has been launched! We’ll celebrate our first year the 1st of March.
    I preferred moving your post from the library to the forum first, to discuss a bit about what have been optimized and what were the past performance. I think other fellow members will participate and I encourage them to do so.

    #26433 quote
    francoisph
    Participant
    New

    hello

    nice code…  I am looking for dax short code. The market is so high at the moment that I prefer shorting dax or dow jones to be honest.

    Main indicator that I like it is rsi pivot and macd.

    #26437 quote
    GraHal
    Participant
    Master

    I agree Franc, Glen can this Strategy go Short also please?

    Thanks
    GraHal

    #26468 quote
    GraHal
    Participant
    Master

    Glen maybe your Short version (you mention) performs better in a downtrend … as Dax appears to have started (until it goes up again! ;)). How did your Short version perform during down periods on Backtest?

    Cheers
    Graham

    #26469 quote
    francoisph
    Participant
    New

    Didnt perform any trades at the moment. I am looking for algo code with low loss.

    #26470 quote
    Derek
    Participant
    Veteran

    Hello gforton,

    thank you for sharing your code.

    If you have been trading this strategy since new year and the variables are optimized for the last weeks have you “reoptimized” before posting or have the last six weeks been a out-of-sample testing period?

    #34816 quote
    GraHal
    Participant
    Master

    Anybody got this working okay in a short version please?

    Many Thanks
    GraHal

    reb thanked this post
    #34856 quote
    GraHal
    Participant
    Master

    This looks promising, but needs to work in short mode also in my opinion?

    Alternatively the Long code attached could be improved as it loses in down periods.

    I have optimised as below and got results attached.

    Please might somebody be able to improve the Long Code and / or add Go Shorts?

    Many Thanks
    GraHal

    ///-------------------------------------------------------------------------
    // Main code : DAX DOMI LONG 03/02/2017
    //-------------------------------------------------------------------------
    DEFPARAM CumulateOrders = false
    
    // Definition of indicators
    
    purple = LinearRegression[6](close)//7
    blue = LinearRegression[8](close)//10
    yellow = LinearRegression[40] (close)//40
    
    a = 1
    b = 0
    
    indicator1 = RSI[35](close)
    indicator2 = time
    
    
    // Schaff Trend Cycle
    MCD = WilderAverage[20] - WilderAverage[50]
    ST =( MCD-LOWEST[3] (MCD) )/(HIGHEST[3] (MCD)-LOWEST[3] (MCD) )*100
    STC = WilderAverage [round(3/2)] (ST)
    
    // Conditions to enter long positions
    
    c1 = (purple > (blue + a))
    c2 = (close > (blue + b))
    c3 = (close > close[1])
    c4 = (blue > blue[5])
    c5 = CountOfPosition <=3
    c6 = (indicator1 < 70)
    c7 = (indicator1 > 49)//49
    c8 = (indicator2 > 082000)
    c9 = (indicator2 < 163000)
    c10 = STC > 6//27
    c11= STC > STC [5]
    
    
    
    
    IF c1 AND c2  AND c3 AND c4 AND c5 AND c6 AND c7 AND c8 AND c9 AND c10 AND c11 THEN
    BUY 1 CONTRACT AT MARKET
    ENDIF
    //
    
    IF LONGONMARKET AND (time > 194000) AND (PositionPerf > 0) THEN
    SELL AT MARKET
    ENDIF
    
    IF LONGONMARKET AND (yellow > (purple + 19)) THEN
    SELL AT MARKET
    ENDIF
    
    // Stops and targets
    SET TARGET pPROFIT 31
    SET STOP pLOSS 72
    
    #34860 quote
    GraHal
    Participant
    Master

    As agreed on another Thread we need to state Times to a standard … times in above code is UTC +1.

    UTC / Universal Time Clock  is not a timezone it is a ‘time standard’ and it’s best if we all state what our times are in our codes in UTC mode.

    (UTC is not an abbreviation for Universal Time Clock but it is the easiest way to to remember! 🙂

    GraHal

    #46848 quote
    halgo
    Participant
    New

    I did not compile the code in MetaEditor.
    gave some errors.
    Can you help me.

    #46853 quote
    Despair
    Blocked
    Master

    Jesus halgo, you are very wrong here. This forum is for prorealtime and not for metatrader. Nothing you find here will work with metatrader.

    #50468 quote
    Leo
    Participant
    Veteran

    Hi gforton,

    Which variables are to be optimized?

    #135462 quote
    deletedaccount051022
    Participant
    New

    Hi gforton,

    I too trade DAX Index and the constituent stocks and really liked your strategy.  After having run some extensive back testing I started running your strategy on a live trading account, albeit with a small amount of risk capital.  Provided the DAX on a daily basis is in an uptrend the performance if very good.

    I was just wondering if you had been using this of late or worked on enhancing it?  Would be interested to swap ideas.

     

    Best regards,

    S

    #135506 quote
    nonetheless
    Participant
    Master

    Attached is a quick re-working of this for DAX 2min.

    It is a disaster. Has the distinction of perhaps the highest annual profit and worst robustness score I’ve yet to see. Possibly the most curve fit thing since Beyonce went shopping.

    Still, the basic code seems interesting and this could be a starting point if someone else wants to take it on.

    Francesco and Scooby thanked this post
Viewing 15 posts - 1 through 15 (of 18 total)
  • You must be logged in to reply to this topic.

Dax intraday scalping strategy


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
gforton @gforton Participant
Summary

This topic contains 17 replies,
has 11 voices, and was last updated by deletedaccount051022
5 years, 8 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 02/13/2017
Status: Active
Attachments: 10 files
Logo Logo
Loading...