Simple open breakout automated strategy

Forums ProRealTime English forum ProOrder support Simple open breakout automated strategy

Viewing 1 post (of 1 total)
  • #72328

    Hello all,

    I have spent time looking for a breakout strategy on the website but I could not find exactly what I have in my mind.

    Could someone help me programming an “open range breakout” automated strategy? I would really appreciate any help. It would be based on a custom range indicator that I have made with the great help of Nicolas (cf. code of the indicator below). So it should not take too long to write the code I guess!

    Rules are as follows:

    Time frame 1H

    The indicator already defines the parameters for:
    – the range = the highest and lowest point of a timeperiod (for example low and high from 5 am to 8 am) +/-5 pips (for example). So the top of the range is high + 5 pips, the bottom of the range is low – 5 pips
    – the profit targets = 50% of the range size, 100% of the range and 150% of the range

    Trades are initiated at the end of the timeperiod range (start at 8 am in this example) and no trade should be taken after 10 pm. Positions are closed at midgnight.

    From 8 am, if the price moves above the top of the range, a buy order is set. If the price moves below the bottom of the range, then a sell order is set. 2 positions cannot be set at the same time. If the first position is a winner, then no further position should be initiated for the day. However, if the first position fails, then another order can be set (if the price reverses its direction for instance), with the limit of 2 orders in total per day.

    => Is there a way to make proorder trigger the buy/sell order just when the price hits the top/bottom of the range, and not after the close of the candle ? I understand that proorder must wait for the close of a candle in which the condition is met in order to set the order. Can this be bypassed? Since the timeframe is 1 hour, it would be too long to wait for a close of the candle!

    Stop loss is either at the bottom of the range (for long position) or the top of the range (for short), as described previously (high or low +/- 5 pips). If the total size of the opening range is more than 50 pips, then no position is initiated for the day.

    3 contracts per position: take profit is in 3 steps as follows:
    – when the price reaches the first target (50% of the range size), 1 contract is sold,
    – when the price reaches the second target (100% of the range size), 1 other contract is sold and stop loss is moved to breakeven
    – then the third contract is sold if the price reaches the third target (150% of the range)

    => I am not sure if it is possible to partially close a position. If not, then the take profit is equal to the range size (target 2).

    Thanks in advance to those who will answer me. The coding of this strategy will also allow me to backtest different parameters.

     

Viewing 1 post (of 1 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login