Historical tick data in an indicator

 

Hi,

I am trying to create a custom indicator which uses tick data (Ask and bid price) to show it as a graph in a separate window. How can I plot the values of historical tick data and keep adding to it the new tick data at real time?

I am using OnCalculate function to get the current tick data but the historical data is not showing in the graph.

Regards.

Dilip