Login Page - Create Account

Support Board


Date/Time: Thu, 25 Apr 2024 20:10:03 +0000



SC hangs after about 50 backtests (Caused by custom study)

View Count: 832

[2019-11-28 17:50:29]
J4yTr4der - Posts: 20
I'm running a lot of backtests in order to test certain variables. I'm using Sierra Chart Back Tester to help with automating the tasks. It works really nicely, except that SC always hangs around 50 backtests (somewhere between 45 and 55).

SC just gets stuck on a message like "Back Testing... 81% Press Escape To Cancel". Escape does nothing, but if I reload & recalculate the chart, everything comes back.

This has happened every single time it gets to around 50 backtests, over a dozen attempts in the last 2 days. At first I thought I was running out of RAM so I added 4 GB more, but that hasn't helped. Anyone have any ideas what causes this?
[2019-11-28 20:21:07]
J4yTr4der - Posts: 20
Interestingly, I just ran again but this time on only 1 day of data. 576 backtests ran back to back without any problem.

This feels like a possible memory leak. SC Back Tester does run the 32-bit version of SC, could this be what's causing problems on larger datasets?
[2019-11-29 03:25:50]
Sierra Chart Engineering - Posts: 104368
If it is consistently reproducible we can look into this. There are different ways of creating an automated trading system in Sierra Chart. What is the method 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: 2019-11-29 03:26:17
[2019-11-29 16:06:17]
j4ytr4der_ - Posts: 918
(replying from my other account since my main machine is busy and I can only log in under my TransAct username from there)

Yes it is consistent. I'm now running backtests on 10 days of data on a 1 minute chart, and twice in a row it has failed at 294 backtests. I'm using Frederik's SST Auto Trader study, testing longs or shorts independently to identify higher probability entries in isolation, then gradually adding money management rules (stops, targets) to develop profitability.

I have 4 studies:

Highest High/Lowes Low over N bars
CBBOAC for long signal
CBBOAC for short signal
SSTAT

Currently I am using C > Highest High of last N bars, or < Lowest Low of last N. I am iterating over # of bars in breakout, initial stop distance, and target distance, long trades only.

Let me know if there is any more information I can provide to help.
Date Time Of Last Edit: 2019-11-29 16:22:50
[2019-11-29 16:51:30]
j4ytr4der_ - Posts: 918
Just failed the next round at 292 iterations. Definite consistency here.
[2019-11-29 18:56:26]
J4yTr4der - Posts: 20
In case it helps, once SC begins failing I get an endless stream of unhandled exception errors in the message log like this:

RTYZ19 [CB] 1 Min #3 | Caught an unhandled exception in c_Chart::WindowProc. Message: 32769, wParam: 32804, lParam: 0 | 2019-11-29 10:54:02.439 *

[2019-11-29 19:12:33]
j4ytr4der_ - Posts: 918
Oh also, memory use by SC definitely climbs, and climbs, until it is over 4GB used, sometime after that is when it generally fails. This also leads me to believe there is a memory leak happening.
[2019-11-29 19:31:09]
Sierra Chart Engineering - Posts: 104368
This is the reason for the problem:
RTYZ19 [CB] 1 Min #3 | Caught an unhandled exception in c_Chart::WindowProc. Message: 32769, wParam: 32804, lParam: 0 | 2019-11-29 10:54:02.439 *

And almost certainly it is caused by this:
. I'm using Frederik's SST Auto Trader study,

Refer to help topic 17:
Sierra Chart Unexpectedly Shutting Down | Memory Errors | Unusual Software Problems | Exception Errors | Freezing of User Interface

We cannot provide further help with this.
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 21:40:17]
j4ytr4der_ - Posts: 918
OK, I have roughly re-created the backtests without the SSTAT study, using only the built in Trading System on Alert studies for my entry and exit signals. Will see if I can replicate the problem that way instead.
[2019-11-29 21:41:08]
Sierra Chart Engineering - Posts: 104368
You will not be able to reproduce the problem when not using custom studies. Make sure you just continue to run Sierra Chart in Safe Mode.
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 23:28:46]
j4ytr4der_ - Posts: 918
It looks like you are correct. I duplicated fairly closely my entry & exit signals using only the built in studies, and 420 backtests using 10 days of data have run so far without any problems. RAM consumption for SC is increasing, but much more slowly than before.

I'm in contact with Frederik regarding this so hopefully a fix is possible.
[2019-12-05 02:37:31]
@sstfrederik - Posts: 403
This is fixed.
[2019-12-05 02:41:04]
j4ytr4der_ - Posts: 918
Frederik beat me to posting, I was going to say something a bit more eloquent about how great he was to find & fix this so quickly and what an outrageously helpful and fast tool SSTAT is. But "this is fixed" sums it up decently too. =)

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

Login

Login Page - Create Account