TrendFlowGrid EA

TrendFlowGrid EA is a grid Expert Advisor for MetaTrader 5 that uses exponential moving averages to determine trend direction before placing trades. It is designed for XAUUSD on a hedge account.

How It Works

The EA monitors two exponential moving averages (EMA 50 and EMA 200) on the H1 timeframe. When the faster average is above the slower average, the EA considers the trend bullish and may open buy orders. When the faster average is below the slower average, the EA considers the trend bearish and may open sell orders.

If the separation between the two averages falls below a defined threshold, the EA stops opening new orders. If it falls below a lower threshold, all open positions are closed.

Grid System

When a new basket is initiated, the EA places an initial order. If the price moves against the position by a set distance, an additional order is placed in the same direction. This continues up to a maximum of 10 orders per basket. Lot sizes increase progressively for later orders in the basket. All orders in the basket share a single combined profit target.

Session Management

The EA only trades within a defined time window based on broker server time. New orders are not placed within 30 minutes of the session end. All positions are closed when the session ends. At the start of each new trading day, all positions are closed and all internal state is reset.

Risk Controls

  • Trading is stopped for the day if price moves against the first position by more than 7500 points
  • No new baskets are opened if the EMA separation is below the minimum threshold
  • All positions are closed if the EMA separation falls below the critical threshold
  • Lot size is fixed and does not scale automatically

Input Parameters

  • StartLot: Base lot size (default: 0.01)
  • LotMultiplierEarly: Lot multiplier for orders 2 to 4 (default: 1.5)
  • LotMultiplierLate: Lot multiplier for orders 5 to 10 (default: 1.2)
  • GridDistancePrice: Price distance between grid orders (default: 5.0)
  • MaxGridOrders: Maximum orders per basket (default: 10)
  • FastEMA: Period of the fast moving average (default: 50)
  • SlowEMA: Period of the slow moving average (default: 200)
  • TrendTimeframe: Timeframe used for moving average calculation (default: H1)
  • BasketStartProfit: Profit target in USD for a single-order basket (default: 1.30)
  • TradeStartHour / TradeEndHour: Session start and end in broker server time
  • CloseOnSessionEnd: Close all positions at session end (default: true)
  • DailyReset: Reset all state at the start of each trading day (default: true)
  • MaxDailyDrawdown: Maximum allowed price movement against the first position before stopping (default: 7500)
  • MinEMADistance: Minimum EMA separation required to keep positions open (default: 1.0)
  • MinEMADistanceOpen: Minimum EMA separation required to open a new basket (default: 3.0)
  • ShowDashboard: Display information panel on the chart (default: true)

Recommended Settings

  • Symbol: XAUUSD
  • Timeframe: H1
  • Account type: Hedge
  • Leverage: 1:500 recommended
  • Minimum deposit: 500 USD recommended

Note

Past performance in the strategy tester does not guarantee similar results in live trading. Trading involves risk. Use this EA with an understanding of the risks involved in grid trading systems.


    Filter:
    No reviews
    Reply to review