Login Page - Create Account

Support Board


Date/Time: Tue, 23 Apr 2024 22:19:03 +0000



Replay - Different filled prices in different speeds

View Count: 2144

[2018-12-24 07:57:53]
UserZiltoid - Posts: 57
Hello SC,
We have noticed that there is an issue with different speeds in Replay, the filled prices are not the same.

We suspect that it is related to that in different speeds 0.1X, 1X, 40X, 80X we see diffrent prices (using simple TEST study).

We see fewer prices when running in higher speed.
* See the attached screen shot of a test result that we did in speeds 1X and 80X, in the right side (80X) there are missing prices.

So as result we assume it causes to different filled prices in different speeds for the same test.
Thanks.
imagemissing_prices.jpg / V - Attached On 2018-12-24 07:57:31 UTC - Size: 250.17 KB - 346 views
[2018-12-25 02:29:48]
Sierra Chart Engineering - Posts: 104368
When using a Replay Mode:
https://www.sierrachart.com/index.php?page=doc/ReplayChart.html#ReplayMode
Other than a Standard Replay, the study function is called at very specific points of processing the Intraday data records for the symbol. And the bid, ask, last trade prices are updated ahead of calling the study function and orders are immediately evaluated for filling when they are submitted.

There is complete consistency no matter what the replay speed is, so any variation must be within your study function. This is where you need to look. We will not know what the problem is. This is only something that you can determine.
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, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2018-12-25 09:23:15]
UserZiltoid - Posts: 57
We use the accurate mode already. This is not the issue.
The program I used was merely a test program that only prints to the log the price and volume. No action taken.
And still we see missing prices.
[2018-12-25 16:42:15]
Sierra Chart Engineering - Posts: 104368
You need to solve this from your side. It does not help the post your own issues here and claim there is an issue without proper basis. There is simply is not. Once again refer to:
Automated Trading Management: Troubleshooting Automated Trading System Behavior

One thing we would say is that the Replay Mode though only can be set before starting the replay. You cannot change it after starting the replay because it has no effect. So make sure it is set correctly before starting the replay.
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, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2018-12-25 16:57:46
[2018-12-25 18:59:08]
UserZiltoid - Posts: 57
There is nothing to solve on my side.
The study I run only prints the prices in the log. and the prices are different in each speed. see below.

Can you supply me with a test program of yours to make sure that the prices are the same regardless of the speed?

-----------
auto currentTime = sc.GetCurrentDateTime();
  auto currentSecond = currentTime.GetSecond();  
  auto currentVolume = sc.Volume[sc.Index];
  auto timeIn = sc.BaseDateTimeIn[sc.Index];
  auto timeEnd = sc.BaseDataEndDateTime[sc.Index];

  SCString test;
  test.Format("Index: %d, Price: %f\nCurrent Time: %d:%d:%d\nTime In: : %d:%d:%d\nTimeEnd: %d:%d:%d\n",
      sc.Index,
      sc.Close[sc.Index],
      currentTime.GetHour(), currentTime.GetMinute(), currentTime.GetSecond(),
      timeIn.GetHour(), timeIn.GetMinute(), timeIn.GetSecond(),
      timeEnd.GetHour(), timeEnd.GetMinute(), timeEnd.GetSecond());

-------------
[2018-12-25 19:22:25]
UserZiltoid - Posts: 57
It is not related.
You have helped me that the time issue. I took a step forward and wanted to make sure that regardless the in accurate time, the prices that we get are the same.
And they are not the same.

Please supply me with a test study to show me how to get the very same prices regardless the speed.
Thanks.
[2018-12-25 19:50:15]
UserZiltoid - Posts: 57
I am sorry by mistake I thouhg you were SC.

I am struggeling with this issue for long time now. We get different filled prices on each replay. We suspect it is related to the missing prices issue.
I hope that SC try to figure this issue.
[2018-12-26 06:55:27]
Sierra Chart Engineering - Posts: 104368
Do not use this function and never use it:
sc.GetCurrentDateTime()

It does not meet your purposes. It cannot meet your purposes. Never use it.

Furthermore, there is no such thing as missing prices. That concept simply is inherently an impossibility. There are couple of different ways to access and each and every single trade within a price bar, refer to:
sc.GetTimeAndSales()
sc.ReadIntradayFileRecordForBarIndexAndSubIndex()
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, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2018-12-26 07:00:05
[2018-12-26 08:53:36]
UserZiltoid - Posts: 57
I am not looking for access to each price and volume - I already do that.

I am trying to understand why do I get different FILLED prices in each replay speed.
We set the very same BUY price, but FILLED prices are not the same.
[2018-12-26 09:14:23]
Sierra Chart Engineering - Posts: 104368
This would be because you are submitting the order at a different trade during the replay. So you need to analyze your own code and figure out why you are doing that.


You have more than enough information to figure this out. It is our very firm policy that we do not provide programming help. We provide good documentation and it is up to the user to do their own work. And if you cannot do this, you need to hire another programmer.
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, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2018-12-26 09:24:54]
Sierra Chart Engineering - Posts: 104368
We simply cannot know the reason for the problem but we suspect it is because you are using this function:

sc.GetCurrentDateTime()

And we made it clear not to use that and we updated the documentation to give several alternatives. Refer to the updated 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, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2018-12-26 18:39:23]
UserZiltoid - Posts: 57
"And if you cannot do this, you need to hire another programmer."

This programmer have already found 2 bugs in Sierrachart. Maybe you should consider to hire him as QA.
[2018-12-26 18:49:54]
Sierra Chart Engineering - Posts: 104368
We are not aware of any bugs. This would have to be competently reported to us and we have not seen anything so far.
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, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2018-12-26 18:50:26
[2018-12-26 18:58:25]
UserZiltoid - Posts: 57
Anyway,
I have taken you're code example: "scsf_TradingExampleWithAttachedOrdersDirectlyDefined" -
didn't change anything just compiled it and ran it as replay on todays chart. got 2 different results in 10X speed and 80X speed.
See attached screen shot.
in the 80X there is a missing SHORT position.
it is the same study, same time, different speeds.

Please tell me what am I doing wrong.
Thanks.
imagespeed 80X.jpg / V - Attached On 2018-12-26 18:58:06 UTC - Size: 332.07 KB - 368 views
imagespeed 10X.jpg / V - Attached On 2018-12-26 18:58:14 UTC - Size: 336.03 KB - 348 views
[2018-12-26 19:40:02]
Sierra Chart Engineering - Posts: 104368
We did the very same test and we see identical results:
http://www.sierrachart.com/image.php?Image=1545853048475.png
http://www.sierrachart.com/image.php?Image=1545852909523.png

This is starting the replay at 09:30 US Eastern time on 12-26. And all prior trade data is cleared for the symbol and account.

So we do not know what you are doing differently. Set the Charts to Replay setting to Single Chart. We would not expect that to make any difference though.
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, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2018-12-26 19:44:48]
Sierra Chart Engineering - Posts: 104368
Actually we can tell now that the problem is indeed due to replaying multiple charts. It does look as though that that would change the processing. We need to look into that but currently the way that it works is by design.
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, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2018-12-26 20:49:54]
UserZiltoid - Posts: 57
Thanks for the update (BTW, it means that my programmer have found his 3rd bug in sierra... :- )

I guess that I found a reason why I have different results in my study, and it is related to the my latest post.
I use the "sc.GetCurrentDateTime" function in order to cancel none filled orders within 30 seconds.
As you mentioned before, it is not an accurate function in REPLAY mode.

So how can I cancel the order after 30 seconds - without using this function?
[2018-12-27 04:50:17]
Sierra Chart Engineering - Posts: 104368
(BTW, it means that my programmer have found his 3rd bug in sierra... :- )
No! It only shows they have not read the documentation. There is no bug here! It is all in the documentation.

This is already fully documented:
https://www.sierrachart.com/index.php?page=doc/ReplayChart.html#ReplayMode

Once we read it we were reminded of this design. And we were not even aware what you were doing anyway. We were looking at this from the perspective of replaying a single chart.

We have linked to that documentation previously.
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, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2018-12-27 06:27:28
[2018-12-27 06:25:18]
Sierra Chart Engineering - Posts: 104368
But we are spending some time looking into why there is any amount of inconsistency even during a multiple chart back test because with a way that is designed, there is a very consistent stepping of time across the chart and the chart should be calculated at consistent points among the intraday data records. What is the Bar Processing Step you are using?
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, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2018-12-27 06:26:57
[2018-12-27 06:39:03]
UserZiltoid - Posts: 57
For the record, I did multiple chart replay by mistake. I didn't notice it.
It didn't ask me for any bar processing step.
[2018-12-28 20:01:05]
Sierra Chart Engineering - Posts: 104368
Okay please let us know after stopping the replay and setting the Charts to Replay to Single Chart if you notice any inconsistencies after starting a new replay back test. There simply should not be.
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, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2018-12-28 20:01:31

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

Login

Login Page - Create Account