Login Page - Create Account

Support Board


Date/Time: Thu, 03 Apr 2025 07:26:26 +0000



Sierra Chart sim trading exiting positions at impossible prices

View Count: 982

[2023-09-22 14:09:49]
User222959 - Posts: 15
Hello, I am currently testing execution of overnight positions. I have attached a couple of screenshots of the strange real-time sim trading behavior where trades execute at prices the candles haven't been (all of the trades referred to here are traded in real time, not replay, and in sim).

I have adjusted number of stored time and sales records from 4000 to 5000 based on previous help articles I have read on this, but don't think this is the problem.

In the first screenshot attached I am trading IQFEED Brent EBZ23 in real time (not replay) and waiting till EOD/overnight while the trade plays out. In this case I left on a trade ~32 lots, and a limit order for around 30 lots for exiting the trade. In this case I chose most of the trades as EOD, rather than GTC, meaning most will cancel at the end of the day. However, the bulk of the exit has occurred at a price that the market hasn't traded.

The second screenshot is of another couple of examples of this behavior with a strange EOD and entry price. This isn't just a visual problem, as it also goes into the PnL and trade stats.

What does this mean for live trading in this situation? I assume it would have just executed at the market rate rather than what SC gives here. I like the functionality SC has for auditing trading performance and trades so the record being inaccurate is a problem. Any help appreciated, thanks.
Date Time Of Last Edit: 2023-09-22 14:14:05
imageSierra Charts Exit 1.PNG / V - Attached On 2023-09-22 14:00:57 UTC - Size: 39.59 KB - 108 views
imageSierra Charts Exit 2.PNG / V - Attached On 2023-09-22 14:01:05 UTC - Size: 35.23 KB - 103 views
[2023-09-23 07:59:31]
User61168 - Posts: 431
I have experienced such behavior but randomly and only during market replay at speeds of 500+ with "Calculate Same as Real Time" option. Are you able to consistently reproduce this error? Even on a brand new sim account with no order fills? Also curious if you are using simple alerts or spreadsheets or ascil.

For me, whenever I see something sporadic with market replays, it's likely related to past order fills from previous market replays and when I select "Clear trade data from start date/time" option.

sgne-It's extremely time consuming endeavor for SC to troubleshoot as it could be related to trading strategy so I can understand why they would not want to waste their time. We just have to work around it knowing that backward and forward testing is only good to design/develop/test the strategy.
[2023-09-23 18:02:07]
Sierra_Chart Engineering - Posts: 19055
They're not going to change their algorithm.
There is no algorithm involved.

For example, when the market trades THRU an order price, sc.SIM will not necessarily generate a fill.
This could not be the case and there must be some explanation in your case why this would happen.

Also, when a market order goes out, sc.SIM will sometimes generate impossible fill prices.
This is not true either. Sierra Chart does not generate fill prices. A market order will be filled according to the current bid and ask prices. You have to look at what those were at the time.

There is an explanation for everything in your case. It is impossible for us to say what happened in the cases you describe. We do not have the information to answer the questions. Only you do.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2023-09-23 18:29:53
[2023-09-23 18:28:15]
Sierra_Chart Engineering - Posts: 19055
However, the bulk of the exit has occurred at a price that the market hasn't traded.
Why? We do not know.

You are able to answer this question. We cannot. There are many variables involved that we do not know at all. From our perspective we do not know what happened in your particular case. You are also using IQ Feed data which is not our data. Here is the relevant documentation:
Trade Simulation: How Orders are Filled

We also added this new section:
Time Stamping for Order Fills

Which is very very relevant.

We will reemphasize in the documentation that orders will not be filled when Sierra Chart is not running and when Sierra Chart is started, the fill price and time will be inaccurate.

Sierra Chart trade simulation absolutely works properly and it is very simple and straightforward. Whatever issues there are, have an explanation. And the user is going to be best able to answer the question based upon the documentation. Not us.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2023-09-23 18:32:36]
Sierra_Chart Engineering - Posts: 19055
The market order fills on sc.SIM 30 points higher than the high of the new bar. Impossible, but that's the way it works with sc.SIM.
Why? How are we supposed to know? We cannot. Provide an answer. There is nothing wrong with trade simulation. You need to provide an answer. You know what happened. You have the data that you can examine in the Intraday data file. Tell us what happened. We certainly do not know. There could not be anything wrong in Sierra Chart trade simulation and you are making statements which are completely false by faulting Sierra Chart for something that it could not do wrong at all. If you do not like what we say, then do not jump into some other users thread, and claim that Sierra Chart trade simulation works in a way in which it could not. Sierra Chart cannot assign a price to a fill, which does not actually exist. This price must have come from somewhere. Either the last trade price or the bid or ask price. There could be bid and ask price updates which are not captured in the Intraday file. So you may not be able to determine at this point what went wrong. But hopefully you have enough information to get more of an idea about the issue.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2023-09-23 18:43:01
[2023-09-23 19:04:19]
Sierra_Chart Engineering - Posts: 19055
Regarding post #7, to examine the Intraday recorded data here is the relevant documentation:
Intraday Data Editor

In regards to post #1, there definitely is a problem with a seemingly invalid price that Sierra Chart was referencing. It would have been a last trade price or a bid or ask price. Was the market open at the time of the fill? Was this during a replay? Was Sierra Chart running at the time that the order should have filled at?

You would need to be looking at the last trade price and bid and ask prices at the time of the fill. Check the File >> Open Time and Sales Window, Window >> Current Quote Window. And also examine the Intraday data at the time of the fill:
Intraday Data Editor

The invalid price is coming from somewhere.


Obviously there is a data issue. Not with Sierra Chart trade simulation mode. That would be impossible.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2023-09-24 08:39:44
[2023-09-23 20:01:40]
User61168 - Posts: 431
Thank you SC Engineering for the link to documentation. My Time and sales stored records was set to 100 instead of 10000. Could you please advice whether "Maximum of Time and Sales Depth levels" setting has any significance in simulated orders? Mine is currently set to 0.

We will reemphasize in the documentation that orders will not be filled when Sierra Chart is not running and when Sierra Chart is started, the fill price and time will be inaccurate.

[2023-09-23 20:16:03]
Sierra_Chart Engineering - Posts: 19055
Could you please advice whether "Maximum of Time and Sales Depth levels" setting has any significance in simulated orders?
No it does not. That setting has little relevancy now with changes with how the Bid and Ask Depth Bars works, which uses the stored market depth data.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2023-09-23 20:16:20
[2023-09-24 14:32:24]
User431178 - Posts: 632
NOT SC Engineering, but...

The last line specifies the problem, which is the Bid and Ask values in the SCID file.

Bid and Ask prices stayed high at Bid: 15368.25 Ask: 15371.25, even though the close of the bar was 32 points below the bid, and trade prices went lower by 17 more points in the next 4 milliseconds. Only when the milliseconds changed from 002 to 006 did the Bid and Ask change in the SCID file.

this is because of artificial SCID Bid/Ask values

The values in the SCID file are not artifical, they are the last values sent by the exchange, your assumptions are wrong.
When you have a large sweep order and/or a cascade of buy/sell stop orders triggered, as in your example, there is no bid/ask update pushed out until all those orders are filled.

Ask and Bid are fine up to line 6. But for line 7, there really wasn't any bid at 15368.25. Theoretically, the Bid was 15368. And since the line 8 trade was no higher than the line 7 trade, the Ask on line 7 could be taken to be the price of the previous higher trade, on line 6. And so forth.

There isn't any 'theoretical' bid... (definitely don't want artifical values in the SCID file do we...)
The best bid (and best ask) is not known until the the order sequence completes, nor would you be able to participate in the sequence unless your order was already in prior to it beginning.


Anyway....

There is a specific option to help with exactly this situation during chart replay.

Chart Settings: Always Simulate Bid and Ask Prices During Replay (Chart >> Chart Settings >> Trading menu)

Maybe try using that?
[2023-09-24 15:46:53]
User431178 - Posts: 632
The CME has decided not to update bid/ask under these conditions. That's an institutional policy, but they could implement a different bid/ask value scheme under such conditions. Clearly, their current policy does generate unreal bid/ask values under certain conditions, like this one.

They could, but what would be the point, the 'unreal' value doesn't affect how orders are filled/executed in real conditions.

If your order is in before the sequence starts, you get filled at your limit (if you're in the LOB) or you get filled at the first available price (based on queue) if stop.
If not, then the next time you can participate, the new best bid/ask will have been pushed out.
[2023-09-25 12:10:20]
User222959 - Posts: 15
Was the market open at the time of the fill? Was this during a replay? Was Sierra Chart running at the time that the order should have filled at?

I've attached further information from activity log and using tick charts. As I said before, all these trades have been taken in real time with no chart replay used, and computer/SC was running in each of these cases.

Activity log shows the trade exited 30 lots on the limit order. At some point the data feed had the market with a tradeable bid/offer at 94.08 at 23:00:00.199 UK. Possibly a closing market dynamic as the Brent market hours are 1AM - 11PM UK on a Thursday- but it is dollars away from the last traded price, 92.24.

In these situations I would rather the simulated orders were linked to the last traded price, not the implied bid/offer prices available, when the market hasn't traded any volume in this area and could be down to data feed error. Anything that would allow the trades to carry on into the next day without hinderance would be a positive.
imageSC Trade Activity 21-09-223.PNG / V - Attached On 2023-09-25 11:01:54 UTC - Size: 108.49 KB - 89 views
imageSC Trade Activity 1 Volume Bar Trade Data 21-09-23.PNG / V - Attached On 2023-09-25 11:03:02 UTC - Size: 28.97 KB - 79 views
imageSC Trade Activity 1 Volume Bar Chart w Bid and Ask Price 21-.png / V - Attached On 2023-09-25 11:04:43 UTC - Size: 27.89 KB - 92 views
[2023-09-25 17:29:28]
User61168 - Posts: 431
Fascinating topic. Perhaps we could move this to User Discussion section.

I apologize in advance for asking a clarifying question. From day 1, my understanding about sim and replays was to never rely on bid/ask. Even an experienced trader back in 2018 told me not to use bid/ask in sim/backtesting/forwardtesting. So, In order to bring my backtest results closest to live results, I have always used the "last" registered price in all my algos. All my entries and exits are triggered using the last price i.e. "C" of the OHLC. To compensate for the slippage etc, I just add a 6-8 ticks to my daily max profit target to compensate for any slippage or spread widening etc. I am curious of your opinion if this is the good (or better) approach compared to relying on bid and ask values. I am not a scalper so it suits my style but I also want to use the correct approach used by professional algo traders.
[2023-09-25 19:18:39]
User61168 - Posts: 431
Yes. I am always using tick data to generate price charts (range, Renko etc). One thing I have consistently noticed is my buy/sell exit at bar close simple alert study will skip to 3-5 bars before closing my position during fast markets. Both in live as well as in sim trading. I wonder if there is any solution to this problem. This usually happens on a 2 or 3 tick range or aligned Renko price chart. Works perfectly fine on 2-3 seconds time chart. I have tried all kinds of chart update interval settings but does not seem to have any effect. This happens even on a very simple one line alert formula so I know it can’t be coding related.
[2023-09-27 20:30:13]
Sierra_Chart Engineering - Posts: 19055
We used to do this in the past but then it would create inaccurate fills when the bid and ask, are both away from the last trade price, and the last trade price is old and then we are filling orders against old data:
In these situations I would rather the simulated orders were linked to the last traded price, not the implied bid/offer prices available,

We can always add an option for this behavior. Maybe that is the best thing.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2023-09-27 20:30:32
[2023-09-27 20:32:30]
Sierra_Chart Engineering - Posts: 19055
The bid and ask prices that you see from the Bid and Ask Prices study :
https://www.sierrachart.com/Download.php?Folder=SupportBoard&download=87611

Only show the bid and ask prices when there is a trade. If these are changing to out of range values, when the market is closed, and then an order is filled against those out of range bid and ask prices, then you are going to get an out of range fill price according to those bid and ask prices. Sierra Chart trade simulation mode does not know when a market is open or closed. This information will be added to the documentation.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2023-09-27 20:32:44
[2023-09-29 14:04:04]
User222959 - Posts: 15
I've updated the global symbol settings for Brent session times as these were slightly off, maybe this was the problem.

Does the sim trading conditionally ignore bid/ask for execution outside the session trading hours if these are entered correctly? If so I think my issue would be resolved.

We can always add an option for this behavior. Maybe that is the best thing.

It would be nice to have an option for this, though I appreciate the benefits of the bid/ask execution simulation so wouldn't always want to use it.
[2023-09-29 14:42:16]
Sierra_Chart Engineering - Posts: 19055
No this is not going to help:
Does the sim trading conditionally ignore bid/ask for execution outside the session trading hours if these are entered correctly? If so I think my issue would be resolved.

This type of functionality does exist on our Trading Evaluator/ Simulated Futures Trading Service but it is not locally used within Sierra Chart on the client side.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing

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

Login

Login Page - Create Account