I'm writing a bot that acts on market signals - currently just based on exponential moving averages. At the moment, I have the program watching the market on multiple different period lengths. For example, it will grab the last price right now, calculate and log a moving average if there is enough data, and then 60 minutes from now do the same. It can be doing this for 5min, 15min, 30min, 2h, 4h, etc. etc. time periods.
However, If I have an algorithm making decisions every 60 minutes, It could very easily lose a lot of money in between the two calculations. My thought is that I should be grabbing market data and calculating values every 1 or 2 minutes, and base those calculations on data from
period_length time ago. It still obviously charts a 60 min or 2h or w/e chart, but does so every 1 min in order to react as fast as possibly to changes.
Is this the correct approach, or am I way off on this?