I want to monitor a customized data (say stock_price_a/stock_price_b) and use the moving average of this ratio as an indicator. I noticed that SMA or EMA function requires a single stock symbol as an input. Is there a way to calculate customized ratio moving average? or I have to do it with a queue and redefine a new function?

Author