I'm new to QC. I'm trying to implement a strategy in QC. In the strategy I use several timeframes at same time to determine a signal. For example, I may use 30m timeframe to generate a candidate signal, then use 10m, 1h, 4h, and daily timeframes to confirm the signal. In each timeframe I may use different number of bars. 

my question: when I have a new bar in 30m timeframe, how can I get last 100 bars in 10m timeframe, 50 bars in 1h, 30 bars in 4h, 20 bars in daily timeframe?