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
1
BUY10000CASHATcloseLIMIT
OR
1
BUY10000CASHATcloseSTOP
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?
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.
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.