DAX 30 sec 5 trads/day

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #113469 quote
    bullbear
    Participant
    Senior

    Have, as you know, worked on an algo that has taken many trads / day.

    Do not believe in an complicated code, then there will be fewer trads.

    Here is a simple code that takes 5 trads / day with low DD.

    I haven’t tested it with WF.

    It’s probably a bit over op.

    An idea anyway.

    Spread=1

    DEFPARAM CumulateOrders=false
    
    defparam flatbefore =090000
    defparam flatafter = 180000
    
    // Conditions to enter long positions
    indicator1 = Average[20](close)
    indicator2 = Average[50](close)
    c1 = (indicator1 CROSSES OVER indicator2)
    
    indicator100 = close
    indicator101 = Supertrend[5,4]
    c100 = indicator100 > indicator101
    
    IF c1 and c100 THEN
    BUY 1 CONTRACT AT MARKET
    
    endif
    
    //************************************************************************
    // TSL trailing stop function
    //************************************************************************
     
     
    //************************************************************************
    //trailing stop function
    trailingstart = 17// 20trailing will start @trailinstart points profit
    trailingstep = 5// 5trailing step to move the "stoploss"
     
    //reset the stoploss value
    IF NOT ONMARKET THEN
    newSL=0
    ENDIF
     
    //manage long positions
    IF LONGONMARKET THEN
    //first move (breakeven)
    IF newSL=0 AND close-tradeprice(1)>=trailingstart*pipsize THEN
    newSL = tradeprice(1)+trailingstep*pipsize
    ENDIF
    //next moves
    IF newSL>0 AND close-newSL>=trailingstep*pipsize THEN
    newSL = newSL+trailingstep*pipsize
    ENDIF
    ENDIF
     
    //manage short positions
    IF SHORTONMARKET THEN
    //first move (breakeven)
    IF newSL=0 AND tradeprice(1)-close>=trailingstart*pipsize THEN
    newSL = tradeprice(1)-trailingstep*pipsize
    ENDIF
    //next moves
    IF newSL>0 AND newSL-close>=trailingstep*pipsize THEN
    newSL = newSL-trailingstep*pipsize
    ENDIF
    ENDIF
     
    //stop order to exit the positions
    IF newSL>0 THEN
    SELL AT newSL STOP
    EXITSHORT AT newSL STOP
    ENDIF
     
    set stop ploss 17
    Dr Manhattan and thanked this post
    idag.jpg idag.jpg
    #113472 quote
    GraHal
    Participant
    Master

    Love the principle … we think alike! 🙂

    Love that staircase equity curve!

    Will it make any money? Easy to find out … I will Forward Test on Demo!

    I let you know if I make any improvements.

    Thank You

    bullbear thanked this post
    #113502 quote
    Lifen
    Participant
    Senior

    Hi Bullbear,

    Very interesting system, thanks for sharing. Have you tried similar algo for short positions ?

    I will run it in demo and let you know if I find any solution to improve it !

    #113512 quote
    bullbear
    Participant
    Senior

    @Lifen

    did a similar for short positions.

    Uses the same trailing as for long positions with the same settings.

    All in order not to over-optimize.

    It doesn’t look very funny, but still it makes 136 € in 10 days.

    Think it is next to impossible to manage to get an algo with such a short TF.

    You probably have to optimize about it very often if you are going to make it work.

    Will run it on demo for the week to com.

    Who knows the two might complement each other?

    You should probably not have too high hopes 🙂

    DEFPARAM CumulateOrders=false
     
    defparam flatbefore =090000
    defparam flatafter = 180000
     
    // Conditions to enter long positions
    indicator1 = Average[70](close)
    indicator2 = Average[80](close)
    c1 = (indicator1 CROSSES UNDER indicator2)
     
    indicator100 = close
    indicator101 = Supertrend[4,11]
    c100 = indicator100 > indicator101
     
    IF c1 and c100 THEN
    sellshort 1 CONTRACT AT MARKET
     
    endif
     
    //************************************************************************
    // TSL trailing stop function
    //************************************************************************
     
     
    //************************************************************************
    //trailing stop function
    trailingstart = 17// 20trailing will start @trailinstart points profit
    trailingstep = 5// 5trailing step to move the "stoploss"
     
    //reset the stoploss value
    IF NOT ONMARKET THEN
    newSL=0
    ENDIF
     
    //manage long positions
    IF LONGONMARKET THEN
    //first move (breakeven)
    IF newSL=0 AND close-tradeprice(1)>=trailingstart*pipsize THEN
    newSL = tradeprice(1)+trailingstep*pipsize
    ENDIF
    //next moves
    IF newSL>0 AND close-newSL>=trailingstep*pipsize THEN
    newSL = newSL+trailingstep*pipsize
    ENDIF
    ENDIF
     
    //manage short positions
    IF SHORTONMARKET THEN
    //first move (breakeven)
    IF newSL=0 AND tradeprice(1)-close>=trailingstart*pipsize THEN
    newSL = tradeprice(1)-trailingstep*pipsize
    ENDIF
    //next moves
    IF newSL>0 AND newSL-close>=trailingstep*pipsize THEN
    newSL = newSL-trailingstep*pipsize
    ENDIF
    ENDIF
     
    //stop order to exit the positions
    IF newSL>0 THEN
    SELL AT newSL STOP
    EXITSHORT AT newSL STOP
    ENDIF
     
    set stop ploss 17
    
    thanked this post
    kort.jpg kort.jpg
    #113523 quote
    Lifen
    Participant
    Senior

    @bullbear

    Thanks for the code for short position. I will run long and short algo in demo for the coming Week and will see if we can make any improvements.

    Will keep you informed. Should be better if we would have a higher TF but who knows…

    Nicolas and thanked this post
    #113555 quote
    bullbear
    Participant
    Senior

    Did a 3 min DAX algo instead of getting some more data to do backtest on.

    WF is also made.

    thanked this post
    dax-3-min.jpg dax-3-min.jpg
    #113558 quote
    bullbear
    Participant
    Senior

    Long

    DEFPARAM CumulateOrders=false
     
    defparam flatbefore =090000
    defparam flatafter = 180000
     
    // Conditions to enter long positions
    indicator1 = Average[10](close)
    indicator2 = Average[50](close)
    c1 = (indicator1 CROSSES OVER indicator2)
     
    indicator100 = close
    indicator101 = Supertrend[7,1]
    c100 = indicator100 > indicator101
     
    IF c1 and c100 THEN
    BUY 1 CONTRACT AT MARKET
     
    endif
     
    //************************************************************************
    // TSL trailing stop function
    //************************************************************************
     
     
    //************************************************************************
    //trailing stop function
    trailingstart = 19// 20trailing will start @trailinstart points profit
    trailingstep = 1// 5trailing step to move the "stoploss"
     
    //reset the stoploss value
    IF NOT ONMARKET THEN
    newSL=0
    ENDIF
     
    //manage long positions
    IF LONGONMARKET THEN
    //first move (breakeven)
    IF newSL=0 AND close-tradeprice(1)>=trailingstart*pipsize THEN
    newSL = tradeprice(1)+trailingstep*pipsize
    ENDIF
    //next moves
    IF newSL>0 AND close-newSL>=trailingstep*pipsize THEN
    newSL = newSL+trailingstep*pipsize
    ENDIF
    ENDIF
     
    //manage short positions
    IF SHORTONMARKET THEN
    //first move (breakeven)
    IF newSL=0 AND tradeprice(1)-close>=trailingstart*pipsize THEN
    newSL = tradeprice(1)-trailingstep*pipsize
    ENDIF
    //next moves
    IF newSL>0 AND newSL-close>=trailingstep*pipsize THEN
    newSL = newSL-trailingstep*pipsize
    ENDIF
    ENDIF
     
    //stop order to exit the positions
    IF newSL>0 THEN
    SELL AT newSL STOP
    EXITSHORT AT newSL STOP
    ENDIF
     
    set stop ploss 24

    Short

    //-------------------------------------------------------------------------
    // Main code : MySystem(30)
    //-------------------------------------------------------------------------
    
    DEFPARAM CumulateOrders=false
     
    defparam flatbefore =090000
    defparam flatafter = 180000
     
    // Conditions to enter long positions
    indicator1 = Average[70](close)
    indicator2 = Average[100](close)
    c1 = (indicator1 CROSSES UNDER indicator2)
     
    indicator100 = close
    indicator101 = Supertrend[7,13]
    c100 = indicator100 > indicator101
     
    IF c1 and c100 THEN
    sellshort 1 CONTRACT AT MARKET
     
    endif
     
    //************************************************************************
    // TSL trailing stop function
    //************************************************************************
     
     
    //************************************************************************
    //trailing stop function
    trailingstart = 20// 20trailing will start @trailinstart points profit
    trailingstep = 17// 5trailing step to move the "stoploss"
    //reset the stoploss value
    IF NOT ONMARKET THEN
    newSL=0
    ENDIF
     
    //manage long positions
    IF LONGONMARKET THEN
    //first move (breakeven)
    IF newSL=0 AND close-tradeprice(1)>=trailingstart*pipsize THEN
    newSL = tradeprice(1)+trailingstep*pipsize
    ENDIF
    //next moves
    IF newSL>0 AND close-newSL>=trailingstep*pipsize THEN
    newSL = newSL+trailingstep*pipsize
    ENDIF
    ENDIF
     
    //manage short positions
    IF SHORTONMARKET THEN
    //first move (breakeven)
    IF newSL=0 AND tradeprice(1)-close>=trailingstart*pipsize THEN
    newSL = tradeprice(1)-trailingstep*pipsize
    ENDIF
    //next moves
    IF newSL>0 AND newSL-close>=trailingstep*pipsize THEN
    newSL = newSL-trailingstep*pipsize
    ENDIF
    ENDIF
     
    //stop order to exit the positions
    IF newSL>0 THEN
    SELL AT newSL STOP
    EXITSHORT AT newSL STOP
    ENDIF
     
    set stop ploss 44
    Paul, GraHal, Lifen and matsodont thanked this post
Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.

DAX 30 sec 5 trads/day


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
bullbear @bullbear Participant
Summary

This topic contains 6 replies,
has 3 voices, and was last updated by bullbear
6 years, 3 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 11/23/2019
Status: Active
Attachments: 3 files
Logo Logo
Loading...