Support Board
Date/Time: Sun, 22 Dec 2024 15:32:25 +0000
Post From: ACSIL Accessing Data from Multiple Charts - Do you have to use Autoloop = 0?
[2015-08-09 03:53:14] |
Jayturn - Posts: 15 |
Thank you for the fast and thorough response. It is clear the Sierra Team care about the needs of their customers. The example using sc.IsFullRecalculation is greatly appreciated and will serve as a good replacement for the persistent variable I was using as my workaround. I came to the understanding the entire study is looped for every chart interval based on the following: In the ArraysAndLooping documentation it's states the following for the "When the study function is called" In the case of manual looping, it will be called 1 time, but may be called a subsequent time when the chart is updated which normally is less than a second later. After the first chart update, the study function will not be called again, unless it is for one of the conditions explained in the next paragraph. After the initial calculation of the study, the study function is called when there is new trade data received, downloaded data received, bid and ask data received, market depth data received, new orders or order updates for the symbol, trade Position updates for the symbol, when records are read from the chart data file during a Replay of an Intraday chart, or when using sc.UpdateAlways = 1. I ran the Visual Studio debugger to see how this worked and found that when sc.Autoloop = 0, the study wouldn't loop through every bar on the chart after it was recalculated. sc.UpdateStartIndex would begin at the latest bar and a "for loop" on the sc.UpdateStartIndex is necessary to access the bars prior to the current index. If you run the replay however, after the initial load which runs the study function once, each trigger of the Chart Interval Update causes the study function to be called. Based on that, I came to the conclusion that a study function is called on each Chart Interval Update (after the initial loading of the study), regardless of the manual or auto loop setting. Is it possible that I am missing a finer detail to this, maybe autoloop calls the study function once for every event (new trade data received, downloaded data received, bid and ask data received, market depth data received... etc) included in Chart Interval Update whereas manual looping groups the events together and only calls the study function once for the group of events? Date Time Of Last Edit: 2015-08-09 03:53:38
|