Support Board
Date/Time: Fri, 28 Aug 2026 18:59:24 +0000
[Programming Help] - ACSIL Historical Intraday Processing Across Continuous NQ Contracts
View Count: 355
| [2026-07-14 11:25:43] |
| User793675 - Posts: 12 |
|
Hello, I am developing an ACSIL study that processes historical NQ intraday data and writes one record per completed trading day to a CSV file. Before continuing development, I would like to understand the most efficient and supported way to process several years of historical NQ data. I have three questions. 1. Continuous Historical Processing Can Sierra Chart load a continuous intraday NQ futures chart across expired contracts (NQH, NQM, NQU, NQZ) while preserving the overnight session and RTH session for every historical trading day, so that an ACSIL study can process each historical session exactly once without manually opening each individual contract? 2. ACSIL Historical Execution If an ACSIL study recalculates on historical intraday data, does it execute exactly as it would have in real time for each completed historical bar, assuming the study does not use future bars or repaint? 3. Recommended Method What is the recommended Sierra Chart method for using ACSIL to build a historical database containing one record per completed trading day from several years of NQ intraday data? Is there a more efficient approach than processing each quarterly contract individually? 4. ACSIL Batch Processing Can an ACSIL study automatically process every historical trading day loaded in a chart and write one CSV record per completed session without requiring replay or manual intervention? Thank You! |
| [2026-07-14 15:45:29] |
| John - SC Support - Posts: 47694 |
|
1. We are not certain of what you are asking in terms of "preserving the overnight and RTH session for every historical trading day". Refer to the information for the Continuous Futures Contracts at the following link. Note the option for back-adjustment, as we think this may be what you are referring to. Continuous Futures Contract Charts 2. Are you referring to during a Replay or a full recalculation? During a Replay, if you use a proper replay option and your code is setup correctly, you will get the same results. While doing a full recalculation, only each bar is specifically calculated, so any trades that would occur intra-bar would not occur. 3. See #1 above. 4. That is completely up to you to code. For the most reliable, advanced, and zero cost futures order routing, use the Teton service: Sierra Chart Teton Futures Order Routing |
| [2026-07-15 14:01:58] |
| User793675 - Posts: 12 |
|
Hello, Thank you for your previous responses. We have one additional set of technical ACSIL questions related to building a historical statistical database from intraday NQ futures data. Our study processes historical intraday bars and writes one CSV record for each completed trading session. Before continuing development, we would appreciate clarification on the following ACSIL questions. 1. Historical Bar Order When an ACSIL study manually loops through historical bars using sc.BaseDateTimeIn[], does Sierra Chart guarantee that the bars are presented in strict chronological order across all historical data loaded in a Continuous Futures Contract chart, including contract roll transitions? Are there any situations where contract roll processing, historical downloads, or chart reloads could result in missing, duplicated, or reordered historical bars that an ACSIL study should detect? 2. Detecting When Historical Data Is Fully Loaded For an ACSIL study that performs one-time historical batch processing, is there a recommended Sierra Chart method for determining when the entire historical chart has finished loading before beginning the processing? We currently trigger the processing manually, but we would like to know whether there is a supported ACSIL method to know when all historical data has been loaded and is ready for processing. 3. Historical Download Completion When processing historical intraday data, are all historical bars guaranteed to be finalized before ACSIL begins executing, or can additional historical data continue downloading after the study starts? If additional historical data is downloaded later, is another full recalculation required to ensure that a historical database built from the chart is complete? 4. Writing One Historical Record Per Trading Day We intend to maintain a continuously growing CSV database by writing one record for each completed trading session. What is the recommended ACSIL method to ensure that each completed trading day is written exactly once, while preventing duplicate records after chart reloads, reconnects, or full recalculations? 5. Futures Contract Roll Information Does ACSIL provide any API support for determining futures contract roll dates or identifying active contract transitions, or is custom logic required for this? 6. Replay vs. Live Event Sequencing When using Chart Replay or Accurate Trading System Back Test Mode, does ACSIL receive historical updates in the same event sequence as live market data, or are there known differences that could affect studies that rely on intrabar event sequencing? Thank you for your assistance. Your guidance has been very helpful as we continue developing this ACSIL study. I appreciate any recommendations for best practices regarding historical batch processing and long-term statistical database generation. Thak You, John |
| [2026-07-15 15:39:28] |
| John - SC Support - Posts: 47694 |
|
1. The bars are always in chronological order. 2. Refer to the following: ACSIL Interface Members - Functions: sc.ChartIsDownloadingHistoricalData() 3. Refer to #2 above. 4. That is up to you to determine. 5. Refer to the following for a function that can help you determine this: ACSIL Interface Members - Functions: sc.GetContinuousContractSymbolForBarIndex() 6. As long as you are using the Standard Replay or Accurate Traading System Back Test Mode, then the processing is the same as real-time. For the most reliable, advanced, and zero cost futures order routing, use the Teton service: Sierra Chart Teton Futures Order Routing |
To post a message in this thread, you need to log in with your Sierra Chart account:
