Login Page - Create Account

Support Board


Date/Time: Sat, 18 May 2024 17:04:58 +0000



Estimated position in queue is 1 in Replay

View Count: 196

[2024-03-28 21:09:12]
User395685 - Posts: 29
I would like to do realistic backtests but the estimated position in queue is always 1 in Replay mode (EP: 1), so limit orders are filled as soon as they are touched.

In trade activity log, I have "Fill based on queue" for limit orders filled. My Intraday Data Storage Time Unit is set to 1 tick, and Number of Stored Time and Sales Records is set to 10000.

I don't have depth of market for CME, I don't know if this could be the reason why it does this.

Is there anything I can do to solve this?
Date Time Of Last Edit: 2024-03-28 21:26:53
[2024-03-29 13:28:12]
John - SC Support - Posts: 31704
You do have to have the Market Depth data in order for the "Estimated Position In Queue" to work.

But, even with the data, during a replay the order filling is not going to be based on the actual Estimated Position in Queue, it will fill as soon as the price level reaches that order. Refer to the 5th paragraph of the documentation for how fills are done for simulation mode at the following link:
Trade Simulation: Limit Orders
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2024-03-29 14:52:43]
User395685 - Posts: 29
In that case, for replays, I need the limit order to be filled if price goes one tick beyond the limit price (one tick below for longs, one tick above for shorts). Is that possible?
[2024-03-29 18:42:38]
John - SC Support - Posts: 31704
You would have to adjust your limit order to make this happen. If you are using a custom study for trading, then you could check if you are in Simulation Mode and adjust the offsets accordingly. But otherwise, there is not a built-in way to do this.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2024-03-29 19:15:45]
User395685 - Posts: 29
The problem is, in real life, many trades touch the target price but end up as losing trades, especially short term trades. So this makes the backtests unrealistic and useless for checking the profitability of the strategy.

I could do what you suggest, but the P/L would have to be recalculated with a program after an export of the backtest results. In my case, I enter trades with stop orders, have a stop loss (stop order) and take profit (limit order), so one tick would have to be substracted from every winning trade. I probably could program this with Python, but it would be a hassle because I would like to backtest my strategy with many instruments, that all have different tick values. I would rather use something already built-in with Sierrachart.

I think this is an important issue for replays. Would it be complicated for you to add a feature like this (limit order fills only if price goes one tick beyond limit order price)?
Date Time Of Last Edit: 2024-03-29 19:48:52
[2024-04-27 23:31:43]
User408093 - Posts: 2
I think this is an important issue for replays. Would it be complicated for you to add a feature like this (limit order fills only if price goes one tick beyond limit order price)?

Or better, add an option that enables queue position estimation during replay.

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account