Half a position (0.5) on DAX 10 minutes – MTF strategy

Viewing 5 posts - 16 through 20 (of 20 total)
  • Author
    Posts
  • #158141 quote
    GraHal
    Participant
    Master

    I’m fed up of waiting for @xrpboss to come back, so I’m putting attached on Demo Forward Test tomorrow! 🙂

    There is scope for improvement if only I knew how it worked! 🙂

    There are loads of trades that exit at £2 profit after having an MFE of > £100!

    Midlanddave thanked this post
    XRP.jpg XRP.jpg XRP-2.jpg XRP-2.jpg
    #158154 quote
    Monobrow
    Participant
    Senior

    How did you get it to work at all? I cant import the indicator ITFs, says “already been imported” or something.

    #158157 quote
    GraHal
    Participant
    Master

    A Trailing Stop might improve it and catch trades with a good MFE before the > £100 profit dribbles away and turns into an exit at £2 profit.

    Attached is the .itf thus far.

    Please post any improvments.

    Monobrow and Midlanddave thanked this post
    XRPboss-DJI-M10-v1.itf
    #158179 quote
    bertrandpinoy
    Participant
    Veteran

    I don’t know why but this code prompted me to look for a solution … look at lines 4, 15 and 23.
    It seems to work..the sharpe ratio is enough you think! lol

    help welcome

    DEFPARAM CumulateOrders = False
    DEFPARAM PreLoadBars    = 2000
    DEFPARAM FLATBEFORE = 000000
    divh, divb, ignored = CALL "Divergence RSI with lookback"[11, 76, 1, 1](close)//14-70/30/30
    one = 1
    if intradaybarindex=0 then
    two = 0
    endif
    if onmarket and three<>tradeindex then
    two=two+1
    three=tradeindex
    endif
    TIMEFRAME (default)
    //four = CALL "O"
    four = (divh < 1) //1000 //aa ici c est divb <
    TIMEFRAME (2 minute, updateonclose)//90 min
    IF Not OnMarket THEN
    five = 0
    ELSE
    five = five + 1
    ENDIF
    //six = CALL "K"
    six = (divb < 1)//1 //aa ici c est divh <
    TIMEFRAME (default)
    ONCE seven = 1
    IF IntraDayBarIndex = 0 THEN
    seven = 1
    ENDIF
    eight = five
    IF Not OnMarket AND eight <> eight[1] THEN
    seven = 1
    ENDIF
    IF six AND seven ANd two<one and four THEN
    BUY 10 CONTRACT AT MARKET
    seven = 0
    ENDIF
    //SET TARGET pPROFIT 400
    //SET STOP   pLOSS   170
    nine = 300
    ten = 240
    IF NOT ONMARKET THEN
    eleven=0
    ENDIF
    IF LONGONMARKET AND close-tradeprice(1)>=nine*pipsize THEN
    eleven = tradeprice(1)+ten*pipsize
    ENDIF
    IF eleven>0 THEN
    SELL AT eleven STOP
    ENDIF
    twelve = 2//12
    fourteen = 1//2
    IF NOT ONMARKET THEN
    fifteen=0
    ENDIF
    IF LONGONMARKET AND close-tradeprice(1)>=twelve*pipsize THEN
    fifteen = tradeprice(1)+fourteen*pipsize
    ENDIF
    IF fifteen>0 THEN
    SELL AT fifteen STOP
    ENDIF
    
    //SET TARGET pPROFIT 4//2
    //SET STOP pLOSS 100// 10
    
    
    //https://www.prorealcode.com/topic/breakeven-with-a-technical-indicator/
    // BUY
    //if ConditionsPurchase AND Not OnMarket then
    //BUY 1 lot AT market
    //endif
    
    // BREAKEVEN
    //SMA20 = Average [aa](close)//20
    //once flag = (close >= SMA20)
    //if OnMarket AND flag =1 then
    //SELL 1 lot AT TRADEPRICE +1 LIMIT
    //endif
    //
    //// TP = HIGH BOLLINGER
    //BBH = BollingerUp [bb](close)//20
    //C3 = (high >= BBH)
    //
    //MyConditionsCloture = C3
    //
    //if MyConditionsCloture AND OnMarket then
    //SELL 1 lot AT market
    //endif
    
    //SET TARGET pPROFIT 6
    //SET STOP pLOSS 200
    
    //------------------------------------------------------
    
    
    //trailing stop function
    trailingstart = 10//4//20 //trailing will start @trailinstart points profit
    trailingstep = 4//10//5 //trailing 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
    
    //stop order to exit the positions
    IF newSL>0 THEN
    SELL AT newSL STOP
    EXITSHORT AT newSL STOP
    ENDIF
    endif
    
    GraHal thanked this post
    Sans-titre.png Sans-titre.png
    #161910 quote
    eckaw
    Participant
    Veteran

    @XRPboss – would you be able to share the code to your 2 indicators in this strategy?

Viewing 5 posts - 16 through 20 (of 20 total)
  • You must be logged in to reply to this topic.

Half a position (0.5) on DAX 10 minutes – MTF strategy


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
XRPboss @xrpboss Participant
Summary

This topic contains 19 replies,
has 8 voices, and was last updated by eckaw
5 years ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 01/15/2021
Status: Active
Attachments: 12 files
Logo Logo
Loading...