Long Candle Trading 5 min Chart Dax Future

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #226229 quote
    Lambo
    Participant
    New

    Hello!

    I need help with a strategy which is based on Long Candle in an High or in an Low of 100 candles in Dax Future.

    I have choosen 5 Minute Candle.

    In the picture there is an example of an Long Trade szeanrio:

    Is there an candle for Long Trade:

    a) which has more than 90 points (Kerze muss größer als 90 Punkte sein)

    b) the low of the candle is lower than all lows (100 candles) before (Kein tieferes Tief als das Kerzentief 100 Kerzen davor)

    c) there is no lower low after the candle is finished (Die Signalkerze darf nicht unterschritten werden)

    than go long, if the course is higher than the high of the candle (Long Einstieg, sobald der Kurs über das Kerzenhoch geht)

    Stop Loss: If the course go under the low of the candle (Stop 1 Punkt unter dem Kerzentief)

    Take Profit 1: 100% of the candle (50% vom Trade wird bei Anstieg um 100% der Kerze verkauft)

    take profit 2: 200% of the candle (50% vom Trade wird bei Anstieg um 200% der Kerze verkauft)

     

    The same logik for short trade: (Die gleiche Logik für Short Trade)

    Candle > 90 points

    no higher high 100 candles before

    no high after the candle is created

     

    Can you help me here please? I already get an screener for this. But this doesnt work with future courses. So i need this for the dax future.

    Thank you

    Dax_Future_Pro_Real_Time_Code.png Dax_Future_Pro_Real_Time_Code.png
    #226607 quote
    robertogozzi
    Moderator
    Master

    Only post in the language of the forum that you are posting in. For example English only in the English speaking forums and French only in the French speaking forums.

    I moved the topic from the German forum.

    Thanks 🙂

    There you go:

    DEFPARAM CumulateOrders = False
    ONCE LB       = 100            //100  lookback periods
    ONCE BigSize  = 90 * PipSize   //90   a big candle must be higher than 90 pips
    ONCE Distance = 6  * PipSize   //6    minimum distance required by the broker for pending orders, if any
    L1            = range[1] > BigSize
    S1            = L1
    L2            = (low[1]  = lowest[LB](low))
    S2            = (high[1] = highest[LB](high))
    CondL         = L1 AND L2 AND Not OnMarket
    CondS         = S1 AND S2 AND Not OnMarket
    // Long  entry
    IF CondL THEN
       EntryL     = high[1]
       StopL      = low[1]
       TargetL1   = EntryL + range[1]
       TargetL2   = EntryL + (2 * range[1])
       IF close < (EntryL - Distance) THEN
          BUY 2 Contract at EntryL STOP
       ELSIF close > (EntryL + Distance) THEN
          BUY 2 Contract at EntryL LIMIT
       ENDIF
       SET STOP PRICE StopL
       SET TARGET PRICE TargetL2
    ENDIF
    // Short entry
    IF CondS THEN
       EntryS     = low[1]
       StopS      = high[1]
       TargetS1   = EntryS - range[1]
       TargetS2   = EntryS - (2 * range[1])
       IF close > (EntryS + Distance) THEN
          SELLSHORT 2 Contract at EntryL STOP
       ELSIF close < (EntryL - Distance) THEN
          SELLSHORT 2 Contract at EntryL LIMIT
       ENDIF
       SET STOP PRICE StopS
       SET TARGET PRICE TargetS2
    ENDIF
    // Long  exit
    IF LongOnMarket THEN
       IF (close >= TargetL1) AND (abs(CountOfPosition) = 2) THEN
          SELL 1 CONTRACT AT MARKET
       ENDIF
    ENDIF
    // Short exit
    IF ShortOnMarket THEN
       IF close <= TargetS1 AND (abs(CountOfPosition) = 2) THEN
          EXITSHORT 1 CONTRACT AT MARKET
       ENDIF
    ENDIF

    I added a DISTANCE option, to abide by IG’s requirement for pending orders. Check their website to check whether it is required for DAX and what value it is, if any.

    JohnScher and Lambo thanked this post
    #226739 quote
    ashehzi
    Participant
    Average

    I think DAX distance during premarket like 2am/3am GMT is around 8 or 10 points on IG index as my orders were rejected when placed at less than 8 points away.

    robertogozzi thanked this post
    #226831 quote
    Lambo
    Participant
    New

    Good Morning!

    First of all! Thank you very much for your help.

    I’m testing it on the real Future, not on IG. Therefore i don’t need the distance. Can you give me the code without the Distance paramether. That would be very nice.

    I check it with candle size 50 Points. The results for this event looks not so bad.

    But I have noticed that

    a) on 25.10.2023 The Short entry is before the candle was short broken. The target with 14900 (1xCandle) and 14840 (2x Candle) is correct.

    b) on 08.12.2023 The long entry is at 16702, but with stop buy order it has to be 16703. The first target ist 16759, but the code take profit at 16767. The second target ist at 16816 ist correct.

    c) on 5.01.2024 i have the same differnce like in case b)

    I have the screenshoots atted in the file.

    Thanks a lot!

    Bsp_lange_Kerze_50_Punkte.png Bsp_lange_Kerze_50_Punkte.png
    #226876 quote
    robertogozzi
    Moderator
    Master

    Simply set Distance to 0.

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

Long Candle Trading 5 min Chart Dax Future


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Lambo @lambo Participant
Summary

This topic contains 4 replies,
has 3 voices, and was last updated by robertogozzi
2 years ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 01/11/2024
Status: Active
Attachments: 2 files
Logo Logo
Loading...