I am trying to write a Volume Profile indicator that accumulates the volume per price in an array, with every tick. I am using [IntrabarOrderGeneration = true] and IntrabarPersist for the relevant variables.
The indicator does get evaluated every tick with realtime data, but apparently the historical data isn't processed in the same way. Is there a way to achieve evaluation per tick for the historical data as well?
I am aware that there is a way to set Volume Profile in the "Format Instrument" settings, however this data cannot be accessed by code.
This brings me to my next questions. At the next stage I want to write a strategy / signal that uses similar volume profile data. As far as I understand, in that case I will need to scan past data first, once, and then to update the array in realtime. Different steps - whereas with the Indicator I treat historical and realtime data in the same way.
- If that is correct, and the signal runs on a 1-minute chart, is it possible to scan back on a tick level?
- Can I access the indicator's data instead?
there is no bar magnifier for indicators unfortunately, therefore I am afraid it's not possible to have an indicator compute the historical data tick by tick.
Your best bet might be to compute your profile from one tick data and store the data in a database or text files. Then you can access the historical data from there.
Another way might be to add a one tick datastream to your chart, but this will be quite CPU intensive and depending on the symbol you can't load too many days of tick data before it slows things down considerably.
The following user says Thank You to ABCTG for this post: