I am trying to reference the values I need between two indicators. One indicator calculates via Calculate.OnEachTick and the other Calculate.OnBarClose. I really want to avoid having to reference FROM the OnBarClose indicator, as this would require adding a tick series and running it on OnEachTick, which would be costly because this indicator is performing a lot of calculations.
To make matters worse, what I need from the OnBarClose indicator is a list of structs, which I don't even know how I would go about referencing.
A solution I'm considering is to Streamwrite the list of structs from the OnBarClose indicator to a file and then Streamread it from the OnEachTick indicator only when I need the values. At first glance, this sounds like it would be a lot easier on performance and "cleaner", if that makes any sense. But, I'm wondering how I can ensure the correct order of operations. Does the order in which indicators appear in the Indicators window of a chart determine the order in which they're calculated? Or, are they calculated asynchronously? If the latter is the case, how can I guarantee I'm getting the latest values?
If I attempt the write / read solution for referencing the list values of another indicator, is there anything I should be aware of that I'm not thinking of?
Thanks in advance for any participation on this!

Comment