Support Board
Date/Time: Tue, 06 May 2025 23:40:38 +0000
Post From: SC Version 2716: (GOOD) Best backtest times ever(BAD) No T&S, TAL Window Updates
[2024-12-05 08:49:34] |
User569373 - Posts: 27 |
About speed of 100000: SC is suggesting that on https://www.sierrachart.com/index.php?page=doc/Backtesting.phphttps://www.sierrachart.com/index.php?page=doc/Backtesting.php paragraph “Replay Back Testing - Automatic” for replaying a single chart. It’s just my way of telling the study to run as fast as the CPU core is capable to do. Running the study with a SC process CPU core utilization of, as an example 4%, when it can run at 16% is a waste of time. Chart Update Interval: The results in the Trade Activity Log (Statistics, Trades) need to be the same, but the Replay takes more time. Running my study takes often 3 minutes 20 seconds with CUI 200 ms with SC 2712. Increasing CUI to 1500 ms brings the duration to 4 minutes 29 second. I understand different Replay Modes giving different results. I do not understand using the same Replay Mode but getting different results at different speeds. That feels odd. A study gets called at each tick. My study is tick based. It’s different to a study which calculates just when the bar got closed. So, I do run the study with Replay Mode: Calculate At Every Tick/Trade). It’s just natural to me to use this mode. I did several tests. The tests did run at speed 100000 and speed 240: Standard Replay - Different results at each run at same speed - The number of trades placed is totally unrealistic with my study Calculate Same as Real Time: - Different results at each run at same speed - The number of trades placed is not realistic with my study Accurate Trading System Backtest Mode - Different results at each run at speed 240 - Same results at each run at speed 10000 (over 5 runs) - The number of trades placed is way more realistic with my study Calculate At Every Tick/Trade (High CPU Usage) - Same results at speed 240 (over 5 runs) - Same results at speed 100000 over more than 1000 runs on three different computers of different ages - Funny: I figured out the duration of the replay is almost equal at speed 240 compared to 100000. Since the SC process CPU core is running at his limit (as with speed 100000) they take the same amount of time. My default replay settings: Charts to Replay: Single Chart Replay Mode: Calculate At Every Tick/Trade (High CPU Usage) Speed: Whatever speed gives the fastest result. 100000/240 is the same for this specific study Skip Empty Periods: checked Start Paused: I prefer checked I have one chart in one chartbook. Time & Sales window is open. Trade Activity Log is open. Trade Orders window is open. The T&S, TAL and TO window do not make much sense while replaying at such high speed because you can’t digest the information as fast, they cum in. But that’s my window setup while backtesting slowly. Since I’m currently just interested into the Profit/Loss and the number of trades placed, I disable the chart drawing part of my study. I tried one time replaying with active chart drawing(s) of my study. One run takes more than half an hour instead of 3 minutes 20 seconds. I also disable printing to the SC Message Log in my study as long I'm not debugging. In Visual Studio Community Edition 22 (free) you can attach the performance profiler (Debug -> Performance Profiler) to the SC process and let the study replay run. After a certain amount of time (few minutes), you stop the performance profiler, and you get a summary where your study is spending the most time in code. Although the performance profiler is on the Debug menu you can run the study as release. Currently I run the study from 08:30 till the end of the ES Day session. It often takes 3 minutes 20 seconds. Depends on the day I choose. SC updates: It is advisable to backup/copy/create archive (zip) of the C:\Sierrachart folder BEFORE updating it. If you can restore the Sierrachart folder, you can play with whatever you like to do in Sierrachart. In case you use a backup software you need to perform a restore in another location. If the restore is successful then and just then you know the backup is useful. You don’t’ need to do this with each backup. The moment you know the backup software is doing its job correctly you just need to do a test restore from time to time. Date Time Of Last Edit: 2024-12-05 09:43:56
|