Skip to product information
1 of 1

forexeasourcecodes

Source Code MQL4 Algo Trend Master

Source Code MQL4 Algo Trend Master

Regular price $21.99 USD
Regular price Sale price $21.99 USD
Sale Sold out
Quantity

The Algo Trend Master is an automated trading system (Expert Advisor) for MetaTrader 4 that trades forex pairs based on price movements relative to a trendline, with built-in risk management and time restrictions. Here's how it works:

  1. Trading Signals:
    • Buy: The EA opens a buy order when the price crosses above a red trendline (based on the "Instant TrendLine" indicator) and no buy order is already open.
    • Sell: The EA opens a sell order when the price crosses below the red trendline and no sell order is already open.
  2. Lot Size:
    • Uses a fixed lot size (default 0.1) or calculates lot size based on a risk percentage (default 1% of account balance).
    • Reduces lot size after recent losing trades to manage risk.
    • Limits lot size to a maximum (if set) and applies a personal percentage (if specified).
  3. Stop-Loss and Take-Profit:
    • Sets a stop-loss based on the Average True Range (ATR) indicator (default 1.5 times ATR).
    • Sets a take-profit at a fixed distance (default 150 pips) or based on trendline levels or recent highs/lows.
  4. Trailing Stop:
    • Activates a trailing stop when the trade is profitable by a certain amount (based on ATR).
    • Adjusts the stop-loss to follow the price by a minimum step (default 0.8 pips) to lock in profits.
  5. Trading Time Restrictions:
    • Trades only during specific hours (default 23:50 to 21:45 daily).
    • Stops trading on Fridays after 20:45.
    • Checks the broker’s spread to ensure it’s below a maximum (default 2.0 pips), unless in backtest mode.
  6. Order Management:
    • Updates stop-loss and take-profit for open trades if needed.
    • Closes orders with invalid stop-loss or take-profit if they are in profit (excluding swap costs).
    • Uses daily and weekly support/resistance levels (from the "Support Resistance" indicator) to refine stop-loss and take-profit.
  7. Requirements:
    • Requires the "Instant TrendLine" and "Support Resistance" indicators to be installed in MetaTrader 4.
    • Trading is halted if indicators are unavailable or if the spread is too high.

How to Use:

  • Setup: Attach the EA to a chart (e.g., EURUSD M15) in MetaTrader 4. Ensure the required indicators are installed.
  • Customize: Adjust settings like lot size, risk percentage, stop-loss, take-profit, and trading hours in the EA’s input parameters.
  • Monitor: Check the MetaTrader 4 Experts log for any errors (e.g., missing indicators or order issues).
  • Test: Run on a demo account or backtest to verify performance with your broker’s conditions.

This EA is designed for trend-following trades with strict risk controls and operates only during allowed times to avoid high-spread or low-liquidity periods.

View full details