Algorithmic and Mechanical Forex Strategies | OneStepRemoved

  • Articles
  • Sophisticated Web Sites
  • Automated Trading
  • Testimonials
  • Contact

Multiple Time Frames or Pairs in an Expert Advisor

October 13, 2011 by Shaun Overton 3 Comments

Many strategies incorporate multi-timeframe analysis in their decision making process. Consider the example of a moving average cross strategy. The most basic version says to buy when a fast moving average crosses above a slow moving average. Multi-timeframe analysis involves jumping to a chart of a longer period to consider the setup there, as well.

Example:
The 20 period SMA (fast) crosses above the 50 period SMA (slow) on the M15 chart.
Now jump to the H1 chart. Is the fast SMA greater than the slow SMA on that chart, too? If so, then the trade is allowed. If not, the EA skips the signal and waits for another one.

The technique has the potential to work if your strategy offers some type of statistical advantage. Moving averages sometimes work when applied using a trader’s discretion of general market volatility. If you leave an MA cross strategy on a chart unattended, however, my expectation is that you would have no better chance than trading at random. Adding another layer of analysis will not change the fact that the basic premise offers no advantage.

MetaTrader does not restrict Expert Advisors to reading information from the applied chart. When you program an EA to trade on EURGBP M5 chart, you may also read price information from the EURGBP M1, EURGBP H1 or any other chart available. You can even read information on multiple pairs.

Some traders like to watch correlated forex pairs and currencies. EUR/USD and USD/CHF typically share a -90% correlation. When EURUSD goes up, USDCHF typically goes down. Exceptions do occur, and those traders tend to look for exceptions on the expectation of them ironing themselves out. Expert Advisors make this fairly simple to handle. You just program the question, “What’s the last closed price of EUR/USD M5 and USD/CHF M5?” The code gives you the answer, then the EA can make decisions with it.

Filed Under: MetaTrader Tips

Comments

  1. Megga says

    December 1, 2017 at 08:33

    Can you please post a simple script on how to get MA value from a higher timeframe ..i have been trying to change the timeframe value on the iMA in mt4 but its not working

    Reply
    • Shaun Overton says

      December 8, 2017 at 12:59

      There’s not a script. Most functions ask you to specify the time. Using iMA() as an example, you enter iMA(Symbol(), PERIOD GOES HERE, …)

      Reply

Trackbacks

  1. Magic number | One Step Removed says:
    January 5, 2012 at 13:12

    […] numbers are useful, particularly when you want to trade multiple time frames of the same currency pair. Traders often use settings that differ on M1 charts versus those that […]

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

FREE trading strategies by email

Trending

Sorry. No data so far.

Archives

  • Dominari
  • How does the forex market work?
  • Indicators
  • MetaTrader Tips
  • MQL (for nerds)
  • NinjaTrader Tips
  • Pilum
  • QB Pro
  • Stop losing money
  • Test your concepts historically
  • Trading strategy ideas
  • Uncategorized
  • What's happening in the current markets?

Translation


Free Trading Strategies

Privacy PolicyRisk Disclosure

Copyright © 2022 OneStepRemoved.com, Inc. All Rights Reserved.