Login Page - Create Account

Support Board


Date/Time: Sun, 05 May 2024 03:04:31 +0000



Post From: ACSIL Accessing Data from Multiple Charts - Do you have to use Autoloop = 0?

[2015-08-08 03:15:36]
Jayturn - Posts: 15
Trading based on multiple timeframes is imperative to my strategies that I have programmed in NinjaTrader and I want to make a permanent shift to Sierra Charts. I'm comfortable programming in C++ but figuring out the best way to access the base chart data and attach studies to those from another study is proving a struggle. I am getting conflicting understandings between the documentation and example code in the ACS_Source files.

It is my understanding that the entire study is looped for every Chart Interval Update. Therefore any request to sc.OpenChartOrGetChartReference() would happen on every interval, including setting the s_ACSOpenChartParameters to be used for opening a chart as part of the study.

Code for scsf_Sum in studies7.cpp suggests you shouldn't frequently call sc.GetChartBaseData (which makes perfect sense). However if I step through the code (during replay) with Autoloop set to 0, the entire study gets run again on every Chart Interval Update. So I have two questions:

1) If using multiple timeframes, does sc.GetChartBaseData have to be invoked on every Chart Interval Update?
2) Autoloop = 0 only prevents calling the study multiple times when loading the chart for the first time and in fact calls the study on each Chat Interval update for live trading?

Any help on this understanding would be greatly appreciated.