Login Page - Create Account

Support Board


Date/Time: Tue, 23 Apr 2024 08:52:05 +0000



Bar based back-test is slower in the newer versions of SC

View Count: 1174

[2019-11-20 16:49:51]
Rearden - Posts: 16
Hi,

the bar based back-test is significantly slower (at least 10-times slower) in newer versions of SC.
Do you know about the issue? If no, I can find the version after which it became slow or provide other information that would help you.
I thought that this was just a temporary bug but it has been lasting for a couple of months now. I have to stay with some of the early 19xx versions because of the issue.

Thank you,

Jan
[2019-11-20 16:57:33]
Ackin - Posts: 1865
Try ver 2002,2003.
[2019-11-20 17:12:07]
Rearden - Posts: 16
I have now tested versions 2002 and 2003 as suggested (and also version 2011) and the bar based back-test is slow in all of them.
Then I tried version 1950 (just a random selection of an old version) and it is much better there.
[2019-11-20 17:58:46]
Ackin - Posts: 1865
There weren't many big changes in the last 60 versions. I assume you are using a 64-bit version.

Check this:
The chart update interval
Chart Settings: Chart Update Interval in Milliseconds (Chart >> Chart Settings >> Display >> Chart Update Interval menu)


and OpenGL
OpenGL support Now Ready for Initial Testing
[2019-11-20 19:04:14]
Sierra Chart Engineering - Posts: 104368
We think the problem relates to the chart update interval:
Chart Settings: Chart Update Interval in Milliseconds (Chart >> Chart Settings >> Display >> Chart Update Interval menu)

Reduce the time for that.
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
[2019-11-20 19:30:20]
Rearden - Posts: 16
I changed chart update interval from 0 (Global) to 250 / 100 / 1. The improvement was only marginal - it didn't solve the problem.

Enabling OpenGL also didn't help significantly.

I am using 64-bit version and I am running the back-test on a 2-minute chart.

I found out that when I remove all studies from the chart, then I achieve the same performance in version 2011 as in version 1975. So the problem may be caused by certain studies? I am not using any custom studies though.

I can go into more detailed testing of the studies but if you have an idea, what the cause could be, it would be very appreciated.
[2019-11-20 20:39:47]
Ackin - Posts: 1865
In layman's terms: A study is a program run by another program. Includes math calculations, graphics/visualisation and more. So any custom study or original of Sierrachart will slow the sw to a certain level. However, this should not be critical to the functioning of the application.


Try another thing. Try to do a completely clean new installation of the software to a different location of the HDD. This test will determine if there is an error in any user program settings.
[2019-11-21 04:52:52]
Sierra Chart Engineering - Posts: 104368
So the problem may be caused by certain studies?
Yes it could be. If you identify what studies they are we can have a look at them. We have had some reports from some users of performance issues in newer versions but we have not been able to identify what the cause is in their case. Maybe it is related to a particular study.
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
[2019-11-29 13:39:18]
Rearden - Posts: 16
So the "Color Bar Based on Alert Condition" study seems to be the one that causes the performance degradation of my bar-based backetests in newer SC versions. After I removed all instances of this study from my chart, I achieved the same performance in versions 1975 and 2017.
[2019-11-29 14:00:11]
Ackin - Posts: 1865
That wouldn't be good .... it's the most used study in Sierrachart ...
[2019-12-03 05:53:58]
Sierra Chart Engineering - Posts: 104368
We think we know why this is happening. We tracked it down to the Current Price Line study which can affect the Color Bar Based on Alert Condition study starting calculation index. We also added a check to ensure the starting index is within bounds.

Please test with prerelease version 2021 and let us know if the performance issue is resolved.
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: 2019-12-03 05:55:40
[2019-12-03 19:27:22]
Rearden - Posts: 16
The issue was partially resolved.

The chart I was testing before performs well now.

However, then I tested a different chart and the runtime of a backtest was still 33% longer in version 2021 compared to version 1975. I don't know yet, whether it is related to the "Color Bar Based on Alert Condition" study as in the previous case, I will need to test it more.
[2019-12-03 21:02:45]
Sierra Chart Engineering - Posts: 104368
Yes let us know if you find another study which is causing the problem and we will check. Each study shows its calculation time in Chart >> Chart Studies >> Studies To Graph. See if you notice a difference in calculation times between the older version and the newer version. We will also do some testing.
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
[2019-12-04 17:11:49]
Sierra Chart Engineering - Posts: 104368
We tested the performance of the Color Bar Based on Alert Condition study with 1975 and 2021 and this is what we determined:

We tested the Color Bar Based on Alert Condition with 3 other studies where the Alert Condition was the following: AND(ID1.SG1 > 24.00, ID2.SG1 > 3095, ID3.SG1 > 20)

The time for calculation in 1975 was 24ms, and in 2021 it was 23ms for 20000 bars

There still could be some combination of settings, studies and/or alert setup which could be potentially be an issue, but it is clear, the performance is still the same.
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: 2019-12-04 17:12:29
[2019-12-10 16:44:31]
Rearden - Posts: 16
Well, I have unfortunately starting using version 2021 for live trading. Today I realised that the Trading System Based on Alert Condition study creates new positions even though it is not supposed to. I lost a lot of money because of the error. Version 1975 doesn't have this error. A few days ago, due to another bug (related to Relative Volume in the first bar of the day session), Sierra missed a huge profitable trade.

My point is that I am rolling back to version 1975 till the end of my SC subscription - due to the reasons described above I have no appetite to continue in performance testing of the newer versions.
[2019-12-10 16:50:13]
Sierra Chart Engineering - Posts: 104368
We doubt very much there is any problem with the Trading System Based on Alert Condition study in newer versions. We definitely do not believe this is the case. Refer to:
Automated Trading From an Advanced Custom Study: Debugging/Troubleshooting Automated Trading Systems


There are no problems with the Relative Volume study either. But do refer to this information here:
Relative Volume: Accuracy of Average Volume Calculation
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: 2019-12-10 16:51:30
[2019-12-10 19:22:10]
Rearden - Posts: 16
Regarding the Trading System Based on Alert Condition issue. I am now back-testing the same chart in 1975 and in 2021. 2021 produces different results. It creates new positions even after an alert condition is no longer valid (the Reset Alert... option doesn't make any difference). Even though I am maybe doing something wrong, I think that it doesn't explain why it worked as designed in 1975. Currently I have no clue what is causing the different behaviour.

Regarding the Relative Volume - it works perfectly during back-tests. However during live connection, it doesn't calculate for the 1st bar (only) of my day session. As a temporary workaround, I extended my day session by 2 minutes (7:30 -> 7:28). I haven't found an answer in the help yet but I can play around the parameters of the study a little bit more.

Apologies for mixing topics. I didn't expect you replying to the 2 new topics.
[2019-12-11 20:59:19]
User90125 - Posts: 715
@Rearden - try finding a copy of the source file for the Trading System Based on Alert Condition from v1975. Compile it, then run it in 2021. See if the results compare with the version provided with v2021.
[2019-12-12 09:02:01]
Rearden - Posts: 16
try finding a copy of the source file for the Trading System Based on Alert Condition from v1975. Compile it, then run it in 2021.
Thank you, it sounds as a good idea. Honestly, I don't know how to compile it, but I guess it is described somewhere in the SC documentation, right?

What the study does in 2021 for me is that after a trade closes on a stop-loss, the study immediately creates a new position, despite the alert condition is already FALSE (or at least it is FALSE in 1975...). One of the conditions is that the daily loss hasn't exceeded a certain value. This condition is now completely ignored (which was an expensive lesson).

I have had a similar issue with Trading System Based on Alert Condition study on daily charts in the past which SCS admitted and corrected.
[2019-12-12 11:00:13]
Ackin - Posts: 1865
I don't know how to compile it

Inside:
v1975
v2017
attachmentTrading System Based on Alert Condition_64.dll - Attached On 2019-12-12 10:59:30 UTC - Size: 97.5 KB - 245 views
[2019-12-12 11:06:37]
Ackin - Posts: 1865
Both versions differ only by the "ACS Control Bar Button"
imagediff1.png / V - Attached On 2019-12-12 11:06:15 UTC - Size: 118.25 KB - 261 views
imagediff2.png / V - Attached On 2019-12-12 11:06:25 UTC - Size: 90.81 KB - 271 views

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

Login

Login Page - Create Account