EA coding problem

 

Hi~Guys!

Is it possible to cross time frames in practical EA development? For example, I want to go long when both 1 hour and 4 hours are long, or short when both 5 minutes and 1 hour are short.


Can the code be put into practice? There will be no problem with the program logic during backtesting

 

It is possible!. I assume you have a indicator that you want to use to determine if price bullish or bearish, you need to create 2 handle indicator one for lower timeframe and the other for higher timeframe that way you can check if both prices from different timeframes going in the same direction or not.


Documentation on MQL5: Python Integration / order_calc_margin
Documentation on MQL5: Python Integration / order_calc_margin
  • www.mql5.com
order_calc_margin - Python Integration - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5