Support Board
Date/Time: Mon, 21 Apr 2025 04:38:30 +0000
[Programming Help] - Need to know when backtest is complete in study
View Count: 44
[2025-03-10 03:50:16] |
masilver - Posts: 25 |
I running a backtest, not to trade, but to generate values for machine leanring. Stuff like differences in price between bars, distance from moving averages, etc. Everything works great and is very fast, but I have one problem. I'd like save these when the backtest is complete. I can't determine when to save to the file. How can I tell when the backtest is complete? I've tried (sc.Index == sc.ArraySize - 1), but these two numbers move in tandom. Although, I swear I've run some tests where they weren't. Perhaps there is a setting somewhere? I've also tried to not close the file, but then it's locked until Sierra Chart closes. I've also tried sc.LastCallToFunction to no avail. Can anyone provide some insight in to how best to handle this? |
[2025-03-10 04:14:34] |
masilver - Posts: 25 |
I think I found a solution. I can toggle a variable based on sc.IsReplayRunning() and that seems to give me the start and end of the replay.
|
To post a message in this thread, you need to log in with your Sierra Chart account: