I’m learning here also. I think the way this seems to work is the code is sent the candle informations on the screen from a certain point in time based on the view of the user. So you get a data stream from the engine that you start to process. You can “save” any of these candles into variables and work with them. So that’s your historical data.
What I’ve noticed with some of the indicators, like vwap, is that if you expand your chart, the vwap is recalculated. This confirms, in my mind, that the engine is recalculating all the candles because the new data changes the location of the vwap lines.
Does that help? Can anybody confirm my understanding or explain this better?