Hi, doing some backtesting with different MA crossing on a 10 minute basis. I’d like to add a filter with the price being > 200 days MA, or possibly 12 months MA. Is it possible to use combine different periods in the code?
but you cannot access multiple timeframes at the same time. If you launch your strategy for a 4h TF, you can only access data referring to that TF, you cannot combine a MA for the daily TF in a 4h TF. You could try to simulate, say, a 200-period daily MA in a 4h TF by multiplying it by 6 (there are 6 4h bars in a day), so an average[200](close) would become an average[1200](close), but it will not yield the very same results.
At least until the MTF (Multi Time Frame) version is released to traders.
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.