Hi,

 

I 'm implementing the 24hour volume of a Altcoin/BTC pair.

I want to make a history request and a warm-up feature.

I made a rolling window for 1440 minutes = 24hour to insert the volume data.

private RollingWindow<decimal> _window = new(1440);
var history = History<TradeBar>(symbol, 1440, Resolution.Minute); //1440 minutes in 1 day.
            	foreach (var bar in history)
            	{
                	_window.Add(bar.Volume);
            	}


				// volume is only available in trade bar
            	if (data.Bars.ContainsKey(symbol))
            	{
                	_window.Add(data.Bars[symbol].Volume);                	
            	} 

Buying part condition:

//BUYING PART!!
if (!invested _window.Sum() > _VolumeMinimum)

 

I'm confused and dont know how to implement a history request and a warm-up featur.

 

Thanks in advance.