To have an indicator which has primary data series P&F based on say 150 ticks.... how to retrieve the tickcount for the current column and previous columns … this I guess would be in a similar manner that NT displays the value in the VOL indicator based on P&F based on tick data eg 150 ticks. How does NT do this ie access tick data series and then display in the vol field for Range bars and also P&F charts?
I have tried using the Volume[0] Volume[1] fields in indicator but it retrieves the same value even if previous P&F columns had different tick counts as can be seen visually on a chart.
I would like to then do this in a multi – series indicator with Minute bars eg 10 and then with a P&F tick data series – and be able to correlate the ticks in the current or previous P&F column with the current or previous Minute bar. Is this feasible.
Perhaps I need a tick data series in addition to above and work with this?
I have gone over the online NinjaScript language and data references and looking to see how to do this.
The OnBarUpdate I would plan on setting to CalculateOnBarClose and then determining if the event was for minute bar close or P&F column close and then proceed to calculate.
Processing on a tick by tick basis I understand there is a check for the firsttickofbar.
I am trying to do the above for forex instruments which i realise is not centralised. Also i realise the volume field for minute data is separate to the tick data in the database.
NT does do something with this when you add the VOL indicator for a P&F (based on ticks) or Range bar chart ie it calculates using the tick data and not the minute data; and you can see this when you display on a chart.
Please let me know if any further clarification on question needed.
thanks
Comment