Buying at market if touched – backtesting

Forums ProRealTime English forum ProOrder support Buying at market if touched – backtesting

Viewing 2 posts - 1 through 2 (of 2 total)
  • #145514

    Hello everyone,

    as I could not find a similar topic, I would like to create a new topic for buying orders “at market with touch”.

    I would like to use in my backtest the order “at market if touched” or alternatively if first is not possible a “Stop buy with limit” order.

    As I don’t know which would be the opening price next day I cannot you

    OR

    In case of using a buy limit order, my order will be executed when price opens below the closing price of the previous day (check therefore attachment 1).

    On the other hand if I use a buy stop order I would buy when price opens above the close of the precious day (check therefore attachment 2).

    My suggested solution would be to have the order “at market if touched”. So that my order is executed if the price touches the close of the previous bar (regardless if the open was below or above the previous bar close). But I could not find a way to implement such an order.

    Alternatively if solution 1 is not possible, I could live with an order like buy at close stop with limit 0.5% below the close. With other words: a buy stop order with limit, so that opening prices way below the closing price of the previous bar will be not executed (the example in attachment 1).

    Can someone give me a hint how to implement such an order?

    Thanks in advance.

    #145518

    Without a crystal ball at the close of a candle we cannot know whether there is going to be a gap or not so we cannot know whether to place an order or not.

    If there is a gap we cannot know at the close of the previous candle how big that gap will be so as to decide whether to place an order or not.

    You could consider using MTF and trade on a faster time frame and check for gaps at the open of the day and then place your orders based on this or the size of this gap. Obviously this limits data available for testing.

Viewing 2 posts - 1 through 2 (of 2 total)

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