Grid Martingale EA with partial closing and MA filter

MQL5 Indicators Experts

Specification

Grid Martingale EA with partial closing and MA filter

This is grid EA


  • EA have Option for Trade Type Option: 
  1. BUY Only,- EA will only place buy only
  2. Sell Only - EA will only place sell only
  3.  Buy and Sell.- both


  • Entry rules for 1st Order
    • EA has Moving Average Filter(enable and disable)
    • If Filter is OFF -  EA will will not check the MA when placing order. EA will place BUY and SELL
    • If the Filter is On. - EA will  place BUY if price is above the buy trend, if the price is below MA trend line, EA will place Sell


  • Rules if the 1st order is losing (negative grid)
    • If  the first Order is losing, place the next order in Grid ( check the minimum grid distance in pip and filters)
  • Rules if the 1st order is in profit. Positive grid
    • The positive grid is not affected with filters.
    • Add EA settings: Positive Grid level in pips: 10pips (dafault)
    • If the 1st order is in profit of 10pips, EA will place another order, same direction and same lotsize.
    • If the last order is in profit of 10pips again, place another order, same direction and same lotsize.
      • Exit for the positive grid
        • The last order will have Trailing stop settings(EA settings, trail start, trail stop, trail step)
        • If the trailing stop is hit, EA will close all orders in profit. Do not close the losing orders.


  • EA will have TWO Martingale GRID  EXIT options.
  1. Exit 1 - EA calculate the breakeven and TP level of all the orders then once EA hits TP level EA will close all orders. Cycle close and start again.
  2. Exit 2 - EA will have a “Partial close percentage” settings = 50 (default)
    1.  EA will not  close all orders if the TP level is hit. EA will close orders Partially based on the Percentage close settings.


  1. If the setting is set to 50%. -EA will  close 50 percent of the lot size of individual orders  except the lowest lotsize like 0.01 which will not be close partially and all the orders below TP line will be closed as a whole. 
  2. Calculate  the breakeven and the TP level using the lotsize that the EA is going to close. 


Additional Filter

  • Opening of the BAR (disable/enable). If enabled, EA will only open an order at the opening of the Bar, if disable,, EA will not be limited in the opening of the bar to open a trade.
  • Moving Average Filter. (Disable/enable) if enable, EA will only open position on the trend. BUy if the price is above the MA trend line and Sell of the price is below the trend line
    • Insert MA settings including Timeframe settings. 


Limits

  • Add Lotsize limit: - if hit stop placing new order
  • Add order limit - if hit stop placing new order
  • Add drawdown limit $ - if hit close all orders,
  • Add drawdown limit equity percentage - if hit close all orders
    • Add option, if hit Drawdown limit, EA will close orders,
      1. Stop the EA- EA will not place anymore orders until restart.
      2. Continue trading



Time Limit

Start time:HH: MM: SS start opening

End time: HH: MM: SS stop opening of new orders


Slippage: 5.0 default. More than this, do not open position. 

Magic Number: 1

Dashboard: True/False

Comment: xxx


Note:

If I change the settings while the EA is trading, please update the EA as well. Example, change the TP level, EA will adjust the TP level of the existing orders. If I change the multiplier. 



EA settings:


Order Type

  • Buy Only
  • Sell only
  • Buy and sell


Initial Lotsize : 0.01

Lotsize Multiplier: 2 (Defaultl)


Profit in Pips: 3.0 (Default)  - pips above breakeven, if hit close all or partial close.


Step Positive Grid: 10.0 (default) - if the 1st order is in profit and it reach 10pips, EA will place another order, same lotsize, and place another order if it hit another 10pips


Trailing for Positive Grid - Positive grid will close if Trailing stop is hit.

  • Trailing start
  • Trailing Stop
  • Trailing Step


Step Negative Grid: 30.0 (default) - if the first order is at loss and it hit 30pips, EA wil place order,  etc.


Exit strategy

  • Close All
  • Partial close


Limits

  • Lotsize limit: - if hit stop placing new order
  • Order limit - if hit stop placing new orders
  • Close if current profit $ - 0- disable 
  • Drawdown limit $ - if hit close all orders,
  • Drawdown limit equity percentage - if hit close all orders
    • If DD limit is hit -Stop trading
    • If DD limit is hit - Continue Trading



Moving average (enable/Disable)

  • Timeframe
  • Period
  • MA method
  • Apply to

Open of the Bar Filter : enable/ disable


Expert working hours: Enable/ disable

Start of opening a position: hh:mm:ss

End of opening new position; hh:mm:ss



Magic Number: 1

Dashboard: True/False

Comment: xxx


Dashboard:

Broker company

Account name:

Balance

Last closed profit (amount after TP level is hitI)

Current Drawdown



Responded

1
Developer 1
Rating
(250)
Projects
460
26%
Arbitration
139
20% / 60%
Overdue
100
22%
Working
2
Developer 2
Rating
(37)
Projects
59
27%
Arbitration
26
19% / 54%
Overdue
10
17%
Working
Published: 1 code
3
Developer 3
Rating
(24)
Projects
29
38%
Arbitration
2
0% / 0%
Overdue
2
7%
Free
4
Developer 4
Rating
(77)
Projects
244
74%
Arbitration
7
100% / 0%
Overdue
1
0%
Free
Published: 1 article
5
Developer 5
Rating
(74)
Projects
73
47%
Arbitration
2
50% / 50%
Overdue
2
3%
Free
6
Developer 6
Rating
(271)
Projects
553
50%
Arbitration
57
40% / 37%
Overdue
227
41%
Working
7
Developer 7
Rating
(11)
Projects
18
28%
Arbitration
4
50% / 50%
Overdue
1
6%
Free
8
Developer 8
Rating
(633)
Projects
1001
47%
Arbitration
33
36% / 36%
Overdue
98
10%
Working
Published: 6 codes
Similar orders
I am looking for an experienced MT4/MT5 developer to analyze my trading history and replicate the strategy in a new Expert Advisor (EA). The developer must have proven experience in reverse engineering strategies, analyzing trading data, and developing EAs across various trading methodologies. A deep understanding of XAUUDS and BTCUSD behavior, as well as chart analysis, is essential. Please note that we do not have
Title: MT5 Forex Trading Robot Development I need a MetaTrader 5 (MT5) Expert Advisor (EA) for automated Forex trading. Requirements: 1. The robot must be fully automated and capable of opening and closing trades without manual intervention. 2. Compatible with MetaTrader 5 (MT5). 3. Adjustable lot size, Stop Loss, and Take Profit settings. 4. Built-in risk management based on account balance. 5. Ability to trade
Risk management EA 30 - 200 USD
Looking to develop risk management EA for personal use probably commercially in the future. I want the EA to have a display panel with 0.1, 0.2, 0.5,1,2,3 percent risk management button. I also want BE, partial closure of 0.25,0.5,0.75 and full closure panel on both profit and loss. I’ll also like to include trailing stop, 2 trades max per day and BE+spread option. I’ll be attaching the image for a guidance on what
Sierra Chart Alerts to MT5 via Webhook (Alert Manager File Version) Objective: Create a Custom Study (ACSIL / C++) that monitors alerts from the Alert Manager file and forwards any valid alert directly to MT5 via an HTTP POST (Webhook) in JSON format. Additional Note: The study should allow adding any modifications in the future and provide clear insights into the alert points in Sierra Chart. 1. Data Flow Diagram
Ea.Mix 30+ USD
I am in need of a good scalping bot for gold or any currency pair. If you have one that is working, reach out. You must be able to provide a trial version so I can test the bot myself
A bot takes trades every few seconds until hit the profit with the same lots , i am attaching a picture as well. If anyone can do that please contact me i will give the account details
MT5 Expert Advisor Development Project Overview I am looking for an experienced MQL5 developer to build a custom MetaTrader 5 Expert Advisor based on a grid-cycle trading framework. This is not a standard grid EA . The system combines: Session-based trade initiation Multi-filter signal generation Dynamic grid management Advanced basket management State-machine-driven trade lifecycle management Dynamic take-profit
Hello, I am looking for an experienced MQL5 developer/trader who specializes in XAUUSD / Gold . I need someone who already has a ready or proven strategy/EA , not someone starting from zero. Requirements: Strong experience with XAUUSD / Gold Expert in MQL5 / MT5 EA development Ready strategy or EA with backtest/forward-test proof Clear entry, exit, and risk management logic Tick data and real spread testing preferred
I want to make an EA that is scripted from the tradingview indicator. where the EA can buy/sell if there is a command signal from the indicator. If you are interested, we can talk in full. Account Type: Hedging Max Open Position: 1 -2 positions total SL: 2.5 × ATR(14) TP: 2 × SL Partial Close: 50% on 1R profit Breakeven: active after partial close ATR Trailing: 1 × ATR(14) Session: 12:00–23:00 server time
I am looking for an MQL5 or MQL4 developer to build a Forex trading bot (Expert Advisor). What I need: The bot should be able to open up to 10 trades per day (24-hour market) Trades should not open all at once — only based on proper signals/conditions Each trade must include: Stop Loss Take Profit The bot must use 1:2 risk to reward The strategy should aim for around 50% win rate (about 5 wins out of 10 trades)

Project information

Budget
30 - 40 USD
Deadline
from 1 to 3 day(s)