Hi all, I was wondering if it is possible at all to include an indicator from another timeframe in a trading system.
At the moment I would like to make a system that uses the 5 minute time frame, but before it executes the trade, it has to be above the 4 hour moving average, just so that a trend is established.
Has anyone been able to do this before/ do they know if it is possible?
What I mean is I want to code the entry on a low timeframe such as 5 or 10 minutes, using a 15-period moving average for that timeframe. But I only want to enter the trade depending on whether the price closes above the 21-period moving average that is used on the 4 hour chart (so 21 – 4 hour periods), if that makes sense…
If I was in the 5 minute timeframe and used MA[48], wouldn’t it just calculate the MA of the last 48 bars?
you need 48×21 = 1008 (you need at least that many bars in history to calculate the MA)
and another thing to bear in mind is if you use IGs 24 hours index (dax for example) there is 5.min bars missing out of hours so the 5-min MA 1080 may not be the same as 4-hour MA 21, so you may have to tweak it to get the same result
To help us continually offer you the best experience on ProRealCode, we use cookies. By clicking on "Continue" you are agreeing to our use of them. You can also check our "privacy policy" page for more information.Continue