SetScaleCompressed with GetAllDataSymbol
Author: ronc
Creation Date: 9/6/2015 11:22 AM
profile picture


To have my indicator data series have valid values at the start of a simulation, I have been using:
Please log in to see this code.

and then Synchronize() on all data series.

How I am using multiple intraday time scales, via SetScaleCompressed() and RestoreScale(). It appears that these only work with Bars, and not with "allData" as described above. Is there a way to do both a) multiple time scales and b) have my data start at the start of the simulation?

If that is not possible, how can I determine the first valid/existing bar of a data series? If I can do that that then I can suppress my trading rules until all of my data series have valid bars.

profile picture


This is not possible.

However, there may be an unsupported workaround in the form of an undocumented class called "BarScaleConverter". I have not tried it with GetAllDataForSymbol myself. "Unsupported" here means no support. You are on your own with this as the class is not meant to be utilized by the end user.

Sample usage:

Code to do SetScaleQuarterly() or SetScaleYearly()
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).