Support Board
Date/Time: Sun, 07 Sep 2025 19:02:33 +0000
[Programming Help] - Suggestions on issue seeing wrong results from study after chart reload vs live/replay
View Count: 34
[2025-09-07 00:50:13] |
rajeshh - Posts: 25 |
Hello - I am looking for general suggestions on what I could do to debug an issue with my custom ACSIL study, where I see the correct results when I run live or replay, but incorrect results just after chart load. Some specifics - This study is referenced from another study. The values in the study are only calculated on bar close using sc.GetBarHasClosedStatus() == BHCS_BAR_HAS_CLOSED All studies have autoloop True Nothing special is done with sc.Recalculation etc. Its almost as if there are two iterations of calls to my study - one time originally, and then 2nd time without resetting all the values, so the result the 2nd time around is different. My expectation is BAR_HAS_CLOSED should only result in the study being executed once for each bar during the lifecycle of the chart loading. Is that an incorrect assumption? Date Time Of Last Edit: 2025-09-07 03:10:14
|
[2025-09-07 10:34:58] |
User431178 - Posts: 771 |
I am looking for general suggestions on what I could do to debug an issue with my custom ACSIL study
Use an IDE that has debugging functionality and step through your code.This study is referenced from another study.
How is the calculation precedence set (for each study), and how are the studies ordered in the studies window?Its almost as if there are two iterations of calls to my study
Do you have chart trade mode enabled? If so the study will be be 'recalculated' twice, once initially, then again when the orders/fills are laoded. Working with ACSIL Arrays and Understanding Looping: When the Study Function is Called |
[2025-09-07 12:39:29] |
rajeshh - Posts: 25 |
Thanks for your response. How is the calculation precedence set (for each study), and how are the studies ordered in the studies window?
Its low and the studies are ordered in the order of dependencies ( as I said, the results are correct when in live or replay mode). |
To post a message in this thread, you need to log in with your Sierra Chart account: