Expert Advisors • Indicators • Scripts • Libraries

MQL.RobotFX.org is the biggest collection of MetaTrader expert advisors (MT5 & MT4), indicators, scripts and libraries that can be used to improve trading results, minimize risks or simply automate trading tasks

MetaTrader 5 Expert Advisor | Flat Trend EA

The author of the idea: Scriptor

MQL5 code author: barabashkakvn

The EA uses the FlatTrend indicator:

The indicator defines the market state: flat or trend.

Interpretation of the histogram color buffers when setting "signal timeframe" PERIOD_CURRENT:

MetaTrader Experts, Indicators, Scripts and Libraries

If Use hour flag is enabled - from Start Hour to End Hour on the bar #Current bar, the FlatTrend is surveyed. If a signal is present, open Buy or Sell. Set a stop loss (only if Stop Loss is not "0.0") and a take profit (only if Take Profit is not "0.0").

Trailing is activated if Trailing Stop is not "0.0".

Test on EURUSD, M15 with these parameters:

MetaTrader Experts, Indicators, Scripts and Libraries

MetaTrader Experts, Indicators, Scripts and Libraries

21929