Dax Open – Long Short Strategy

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #255266 quote
    DrewResner
    Participant
    New

    Hi Everyone.

    I am new to ProRealTime forgive me if I create a question in the wrong location.

    I want to gain experience by automating simple trades.

    I’m asking for advice on how to automate the following trades to run simultaneously.

    Open a long trade at 08:00 on the Dax.
    €5 a point.
    Limit 20 points.
    Normal Stop 10 points.
    Open a short trade at 08:00 on the Dax.
    €5 a point.
    Limit 20 points.
    Normal Stop 10 points.
    #255276 quote
    Wim
    Participant
    New

    Hi, this could get you started. There are some issues with this approach you should be aware of. Not all account types accept simultaneous long and short positions, you need a hedging allowed account. Furthermore I found by testing on my demo account with IG, that launching a long and a short at 8:00, only the short gets filled. I, therefore, introduced a 5 minute delay for the shorts. Also at 8:00 in the morning the spread is high, 2.8 points, whereas later on the day the spread reduces to 1.4 points. You should indicate this in your backtesting settings, otherwise your results will be too optimistic.
    I found that it is better to forget about the shorts. But I leave it up to you from here to evolve this simple strategy in a robust and profitable one.
    Note: The result is for long only with a Take Profit at 15 points and a Stop Loss at 45 points.

    Iván González, robertogozzi and Nicolas thanked this post
    #256538 quote
    AI-vy
    Moderator
    New

    @drewresner you can code the “08:00 long + 08:00 short with TP/SL” in ProOrder, but there is one hard constraint: ProRealTime brokerage connections do not allow being long and short on the same instrument at the same time (no hedging). In that case, the second order will typically be rejected, netted, or one side won’t be filled. So you must first confirm your account is hedging-enabled for the DAX instrument you trade.

    ProOrder template (places both directions at 08:00, each with TP 20 / SL 10 points)

    • Runs on intraday timeframe (e.g., 1-minute) so that time = 08:00 is detectable.
    • Uses one-shot flags so it only sends orders once per day.
    • Applies TP/SL in points via SET TARGET PROFIT and SET STOP LOSS.
    • Position size: In ProOrder you control size in “contracts/units”. “€5/point” depends on the specific DAX product (CFD, futures, etc.) and its point value. You must set Size to the quantity that corresponds to €5/point for your broker/instrument.
    DEFPARAM CumulateOrders = True  //Allows multiple simultaneous positions IF your broker/account allows hedging
    DEFPARAM PreLoadBars = 5000
    
    // — User parameters —
    timeEntry = 080000
    tpPoints  = 20
    slPoints  = 10
    Size      = 1          //Adjust to match €5/point on your specific DAX product
    Direction = 1 //choose direction of the trade (1=long ; -1=short)
    
    // — Risk management (applies to new positions) —
    SET TARGET PROFIT tpPoints
    SET STOP LOSS slPoints
    
    // — One entry per day per direction —
    ONCE dayStamp = 0
    ONCE longDone = 0
    ONCE shortDone = 0
    
    IF Day>dayStamp or Day<dayStamp THEN
     dayStamp = Day
     longDone = 0
     shortDone = 0
    ENDIF
    
    // — Entry logic at 08:00 —
    //Important: requires an intraday chart so Time is available
    IF Time = timeEntry THEN
    
     //Long at 08:00
     IF longDone = 0 and direction = 1 THEN
      BUY Size CONTRACT AT MARKET
      longDone = 1
     ENDIF
    
     //Short at 08:00
     IF shortDone = 0 and direction = -1 THEN
      SELLSHORT Size CONTRACT AT MARKET
      shortDone = 1
     ENDIF
    
    ENDIF

    Why this works (logic)

    • Time = 080000 triggers on the bar that starts at 08:00 (on a 1-minute chart, that is the 08:00 candle).
    • dayStamp / longDone / shortDone reset each new day so the strategy won’t re-fire at 08:00 on every bar or after reconnects.
    • SET TARGET PROFIT and SET STOP LOSS define exits for each position opened afterwards.

    Important ProRealTime / broker constraints you must account for

    • No-hedging accounts: you cannot hold long and short simultaneously on the same instrument; the second order may be rejected or netted.
    • Execution at 08:00: spreads can be wider at the cash open; if you backtest, set a realistic spread in the ProBacktest settings, otherwise results will be optimistic.
    • Matching €5/point: confirm the DAX instrument’s point value and set Size accordingly (this is instrument/broker-specific).
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Dax Open – Long Short Strategy


ProOrder support

New Reply
Author
author-avatar
DrewResner @drewresner Participant
Summary

This topic contains 2 replies,
has 1 voice, and was last updated by AI-vy
1 day, 11 hours ago.

Topic Details
Forum: ProOrder support
Language: English
Started: 01/14/2026
Status: Active
Attachments: 2 files
Logo Logo
Loading...