MultiTimeFrameMACD
- Experts
- Piyachai Lertjuntuek
- Versione: 1.0
- Attivazioni: 5
1. Core Concept
This Expert Advisor is designed as a Multi Time Frame Trend Following strategy.
It uses the MACD (Moving Average Convergence Divergence) indicator to identify market trends and trade only in the direction of confirmed momentum.
The main objective of the EA is to reduce false signals by entering trades only when multiple timeframes agree on the same trend direction, combined with strict risk and money management rules.
2. Multi Time Frame Trend Analysis
The EA analyzes MACD values on three different timeframes:
-
D1 (Daily) – Defines the primary market trend
-
H1 (Hourly) – Confirms the secondary trend
-
M5 (5 Minutes) – Determines precise entry timing
Trend determination is based on the MACD Main Line:
-
MACD value above zero → Bullish trend
-
MACD value below zero → Bearish trend
3. Trade Entry Conditions
-
A BUY position is opened only when MACD on D1, H1, and M5 are all above zero.
-
A SELL position is opened only when MACD on D1, H1, and M5 are all below zero.
-
If the MACD signals are not aligned across all timeframes, no trade will be opened.
-
The EA allows only one open position per symbol (No Grid, No Martingale).
4. Lot Size Calculation
The EA supports three lot calculation modes:
-
Fixed Lot
Uses a constant lot size defined by the user. -
Risk-Based Lot (% Risk per Trade)
Automatically calculates lot size based on account equity, selected risk percentage, and Stop Loss value. -
Auto Adjust Lot
Automatically adjusts lot size according to account equity
(approximately 0.01 lot per 1000 USD).
5. Stop Loss and Take Profit
-
Stop Loss and Take Profit can be defined in points.
-
Setting a value to zero disables the respective function.
-
Stop Loss and Take Profit are applied immediately when opening a position.
6. Trailing Stop Management
-
Optional Trailing Stop function can be enabled or disabled.
-
When price moves in favor of the position by a predefined distance, the EA automatically adjusts the Stop Loss.
-
A trailing step is used to avoid excessive Stop Loss modifications.
7. Risk Filters Before Trading
Before opening any position, the EA checks:
-
Maximum allowed spread
-
Maximum slippage
-
Available free margin
-
Maximum number of trades per day
If any condition is not met, the trade will not be executed.
8. Daily Risk Management
-
Daily Drawdown Limit
If the account equity drops by the specified percentage from the daily maximum, all positions are closed and trading stops for the day. -
Daily Profit Limit
If the daily profit reaches the predefined percentage, all positions are closed to secure profits.
9. Profit Target by USD
-
The EA can close all open positions once the total profit for the symbol reaches a specified USD amount.
-
This feature is useful for basket-style profit locking.
10. Total Equity Target (EA Stop Function)
-
When the total account equity reaches the user-defined target, the EA:
-
Closes all open positions
-
Stops trading automatically
-
-
Ideal for profit goals, funding challenges, or capital protection strategies.
11. Daily Statistics Reset
-
Daily trade count, starting equity, profit, and drawdown values are reset at the beginning of each trading day.
-
Ensures accurate daily risk calculations and limits.
12. Real-Time Dashboard
The EA displays a real-time dashboard on the chart showing:
-
Trend direction for D1, H1, and M5
-
Lot calculation mode
-
Stop Loss / Take Profit settings
-
Trailing Stop status
-
Daily trade count
-
Current spread
-
Daily profit and drawdown
-
Current equity and profit targets
13. Suitable Trading Conditions
-
Designed for traders who prefer trend-following strategies
-
Best performance in markets with clear directional movement
-
No Grid, No Martingale, No Recovery systems
-
Strong focus on risk control and account protection
