Create an Trend Trading Martingale EA incorporating an Indicator to get trend direction

MQL5 Experts

Job finished

Execution time 9 days
Feedback from customer
Victor did a great job with the EA. He has good communication skills and is a skilled programmer. Would buy again from him!

Specification

**Objective**: Develop a trend-following Expert Advisor (EA) that opens trades based on a trend detected across multiple timeframes using the *AllAverages_v4.9_MT5* indicator. The EA should use a Martingale strategy, only adding trades in the same direction when the price moves against the initial position, and include several risk management settings.

### Strategy Overview
1. **Trend Detection**:
   - The EA should detect a trend by analyzing the *AllAverages_v4.9_MT5* indicator across multiple timeframes.
   - Execution timeframe will be set to M1, but the trend should be confirmed on multiple selected timeframes.
   - **Condition for Entry**: The EA will open a trade only when all selected timeframes show a trend in the same direction, as indicated by the *AllAverages_v4.9_MT5* indicator.
   - **Trend Identification**: The EA should use the uptrend/downtrend buffers of the indicator to determine the trend direction.

2. **Martingale Strategy**:
   - If the price moves in the opposite direction of the open trade, the EA should open an additional trade in the same direction as the initial trade but with a larger lot size.
   - The lot size for each subsequent trade should increase based on a configurable Martingale multiplier.
   - The step size (in pips) for opening the next position when the price moves against the trade direction should also be configurable.

   - There should be a configurable maximum number of trades in the Martingale sequence to prevent excessive risk.
   - The EA should keep opening new trade sequences whenever the last sequence hits TP and the trend is still confirmend on all selected timeframes.


### Configurable Settings
1. **Trend Confirmation**:
   - The EA should allow setting the number of timeframes that must show the same trend direction before opening a trade.
   - Users should be able to select a specific type of moving average (e.g., HMA, EMA, DEMA, etc.) for each timeframe individually (e.g., H4 could use EMA while M1 uses DEMA).

2. **Trade Settings**:
   - **Starting Lot Size**: Configurable starting lot size for the initial trade.
   - **Martingale Multiplier**: Factor by which the lot size should increase with each subsequent trade in the Martingale sequence.
   - **Step Size**: Number of pips the price must move against the last opened trade of the sequence before the EA opens the next trade in the Martingale sequence.

3. **Take Profit (TP) Settings**:
   - TP should be configurable in terms of profit per trade (e.g., $20).
   - When a new trade is added to a sequence, the TP should be adjusted to the same for all open trades so that if the TP is hit, the total profit is equal to the target profit specified for the first trade (e.g., if the first trade's target was $20, the cumulative profit for all trades in the sequence should still be $20 when the TP is hit).
   - The TP should increase, if necessary, but should never result in a lower total profit than initially targeted.
   - The TP should be updated only when a new trade is added to the sequence.
   - Spread should be factored in the TP level.

4. **Stop Loss (SL) Settings**:
   - Configurable SL as a percentage of total account equity.
   - This SL should apply to the entire trade sequence, not individual trades. For example, if the SL is set to 5% of equity and there are 4 trades in the Martingale sequence, the SL should adjust to the same for all open trades such that the combined loss would equal 5% of equity if hit.
   - The SL should be updated only when a new trade is added to the sequence.

5. **Time Filter**:
   - The EA should have a configurable time filter to limit when new Martingale sequences can begin.
   - Users should be able to set specific time windows for trading (e.g., 00:00-08:00 and 14:00-23:59). 
   - If a sequence is still open outside of the trading window, the EA should continue to manage the sequence (e.g., adding trades if necessary and changing TP/SL) until it closes via TP or SL.
   - The time filter should use server time.

6. **Capital Loss Limit**:
   - An option to set a maximum allowable loss in dollar terms. If this loss limit is reached (including floating losses), the EA should:
      - Close all open trades immediately.
      - Disable itself to prevent further trading.
   - This feature ensures compliance with prop firm drawdown limits. The EA should continuously monitor floating losses on each tick to prevent violating drawdown rules.

7. **Magic Number**:
   - The EA should have a configurable magic number to help distinguish trades it opens from other trades on the account.

### Additional Features
1. **Logging**:
   - The EA should log all key actions, such as when a new trade sequence starts, trades are added to a sequence, TP or SL levels are modified, and sequences are closed.

2. **Alerts**:
   - The EA should send an alert whenever a new sequence is opened and when a sequence closes.
   - These alerts should be configurable for desktop notifications and push notifications to a mobile device.

### File Requirements
- The EA should be able to access the *AllAverages_v4.9_MT5* indicator directly to read trend up/downtrend buffers.

### Summary
This EA will serve as a trend-following system using multiple timeframes to confirm a trend direction, with a Martingale approach to manage trades when price moves against the position. Configurable settings will allow for precise control of trade entries, lot sizing, risk management, and time filters. Key logging and alerts will enhance monitoring, and robust risk management features ensure compliance with prop firm trading rules.


Responded

1
Developer 1
Rating
(20)
Projects
24
54%
Arbitration
3
0% / 100%
Overdue
2
8%
Free
2
Developer 2
Rating
(82)
Projects
121
16%
Arbitration
4
25% / 25%
Overdue
11
9%
Busy
3
Developer 3
Rating
(6)
Projects
10
10%
Arbitration
8
0% / 88%
Overdue
1
10%
Free
4
Developer 4
Rating
(5)
Projects
7
14%
Arbitration
2
0% / 0%
Overdue
1
14%
Working
5
Developer 5
Rating
(9)
Projects
19
16%
Arbitration
3
67% / 0%
Overdue
0
Free
6
Developer 6
Rating
(19)
Projects
20
25%
Arbitration
11
18% / 9%
Overdue
3
15%
Busy
7
Developer 7
Rating
(51)
Projects
89
52%
Arbitration
1
0% / 0%
Overdue
1
1%
Free
8
Developer 8
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
Similar orders
Pljo 50+ USD
The idea of the trading system is as follows: market entries are performed when MACD's main and signal lines intersect in the current trend direction. 2. Trend is determined based on the Exponential Moving Average with the specified period (InpMATrendPeriod). If the current EMA value is greater than the previous one, the trend is seen as growing (ema_current > ema_previous). Alternatively, if current EMA is below the
System go 50+ USD
"system rules have not been formulated. So, what the Customer calls a trading system is actually only an idea. All nuances and absence of required logic descriptions will be revealed during the development process. The developer will have to think out possible options, which were not provided by the Customer. The Developer may program a trading robot at his own risk in this case. But you are likely to lose much time
Ivy indicator 30+ USD
The idea of the trading system is as follows: market entries are performed when MACD's main and signal lines intersect in the current trend direction. 2. Trend is determined based on the Exponential Moving Average with the specified period (InpMATrendPeriod). If the current EMA value is greater than the previous one, the trend is seen as growing (ema_current > ema_previous). Alternatively, if current EMA is below the
Trading robot name: FX Terminator *General Settings* >Broker : AccuMarket-Live 1. *Trading Instruments*: - XAU/USD (Gold) - US30 (US Dow Jones 30) - USTECH (US NASDAQ 100) - GER30 (German DAX 30) - GBP/USD (British Pound/US Dollar) - EUR/USD (Euro/US Dollar) - XAU/USD MICRO -US30 MICRO -USTECH MICRO 2. *Timeframe*: 30-minute chart (or 1-hour chart) 3. *Account Type*: Standard account (1:500 leverage)
Indicator: Parabolic SAR Trade as per the signal, close at TP: Check the indicator one again and initiate a new trade as per signal, the EA would continuously trade If the indicator signals a new direction and the initial trade is in PROFIT, close and initiate new trade in new direction as per the indicator If the indicator signals a new direction and the initial trade is in LOSS, don’t close : · Initiate a new
I have a list of 7 videos where I showcase different trading strategies on TradingView. The goal is to implement all 7 strategies into an Expert Advisor (EA), then run backtests to determine which one performs best. Once tested, all strategies will remain available within the EA, allowing the user to select their preferred strategy. The bot will then automatically start trading based on the selected strategy
Hello, I am looking for a great developer that can be able to code this exact EA with a name change. https://m.youtube.com/watch?v=yxy5eQy0pkk i will be looking for your response thanks you best regards Ayofe
I have the logic for an EA and I coded it. The EA opens and closes positions repeatedly non-stop. I do not know what to do. I am new to coding. I reference custom indicators but I cannot give them all out. Please help
This strategy aims to identify and trade based on swings in market structure, utilizing Fibonacci retracements and a confirmation checklist. Market Structure Analysis: It first identifies swing highs and lows. When price breaks a previous swing high (in an uptrend) or swing low (in a downtrend), it registers a Break of Structure (BOS). If price breaks a swing low during an uptrend or a swing high during a downtrend
I am looking for 2 source codes (1 MQL 4 + 1 MQL 5) of moving average crossover. 2 expert based on crosse MA. I remain ready for more details. ( Speaking French is desirable )

Project information

Budget
50+ USD
VAT (19%): 9.5 USD
Total: 59.5 USD
For the developer
45 USD