- ago
Hi
I activated a live trading strategy, which generates buy and sell positions. After some time I did a backtest on the same strategy.
The results largely differ. In live trading there no buy and sell positions, as there are in backtest results.




Previously In trading preferences in part Miscellaneous Trading Settings I also enable option
" Convert Limit /Stop to market if current quote exceeds price "

In a backtest, there are three positions one after the other, with a buy and a sell order.
The same positions were not generated in live trading. The strategy is with " Buy at limit" order.
In my opinion, as soon as the backtest shows three positions one after the other, the requested limit price has been reached. I wonder why none of these positions were generated during live trading.
By enable " Convert Limit /Stop to market ...." limit orders should be realized immediately.


I wonder why the same strategy gives different results. Why does it not generate positions in live trading, because the desired price has been reached.
How to solve this situation ?

0
114
3 Replies

Reply

Bookmark

Sort
Cone8
 ( 4.92% )
- ago
#1
I don't know anything about your strategy, but you should know that in live trading, limit orders do not guarantee an entry even if "touched".

In backtests, you'll always get the position if touched. However, you can apply "Limit Order slippage" for backtests to ensure price has traded through the limit price before it puts on a position, but if you use Slippage, you better use a Strategy compatible with the "Live Positions" preference because sometimes you will get the position if touched in live trading and then you will need "Live Positions" to sync the strategy to it.

You pointed to "Convert Limit/Stop to Market... "
This would almost never apply to an intraday limit order strategy unless you were purposely placing, say a Buy at limit order above the current price. And, if you did that, you might as well change the strategy to use Market orders - and then the backtest will almost certainly match live trading.

In summary, it's no surprise that a limit order backtest - with what appears to be minute movements - will not match live trading.
0
- ago
#2
Тhanks for the answer.
A small explanation about the strategy. It is about intraday trading where there are about 40 positions during a day. Limit order is always below current price. But the value of Limit price is calculated based on the values ​​of the last two bars. That means that Limit price has always variable value. With each successive bar, the value of the limited price also changes.
This is a picture of Buy at limit strategy


I changed the same strategy with Market order, but the results were disastrous

Maybe I'm doing something wrong.
Is it somehow possible when the current price touch Limit price,
to make a transaction. In other words, at that moment, the limit price to be transformed to market price( that is my main goal )
If there is such an option, please show me with Building blocks, what should the strategy look like?
Thanks in advance
0
Cone8
 ( 4.92% )
- ago
#3
No, there's not way to do that. The main problem is that you're trading too frequently with minimal movements - ticks. A limit order that isn't at the "Ask" needs time to work.

You can try setting the backtest preferences with 1 tick of limit order slippage and also turn on "Live Positions". It should work to keep things in sync.

Your backtest results will probably suffer since it "miss trades" that don't trade at least 1 tick below the limit price - but it will probably provide a more realistic result.
0

Reply

Bookmark

Sort