EA to limit what trades can be executed

MQL5 Experts

Job finished

Execution time 2 days
Feedback from customer
Great developer, asked lots of questions until it was clear what needed to be done, completed job within budget and ahead of schedule.
Feedback from employee
Good and calm customer, knows exactly what he wants and available to clarify details

Specification

Hello,

This EA will be sort of a gatekeep or a type of guardrail for an account that sends signals to others accounts.

It will (1) limit the direction that trades are allowed to be opened and (2) limit the total number of lots (market and pending) that are allowed to be opened.


More detail:

  • A text and and accompanying dropdown for each of the 7 major USD pairs (EURUSD, GBPUSD, AUDUSD, NZDUSD, USDCAD, USDJPY, USDCHF)
    • The dropdown will have 4 choices: buy, sell, both and neither.  These will allow trades in that direction
      • If buy is selected for a pair (USDCAD for example), then sell orders will be closed by the EA if opened.  
      • If Sell is selected, then buy orders will be closed by the EA if opened.  
      • If Both are selected then the EA won't do anything.  
      • If Neither is selected then any orders on that pair will be closed by the EA.

  • Limits the total number of lots that are in OPEN orders at a given time.  
    • This needs to be in increments of .01 and I don't think there needs to be an upper limit.  
    • If the limit is .05 and there are .04 lots open and an order of .02 is added, then that .02 order should be closed
      • however, if the market order is changed from .02 to .01 then it is not closed by the EA.  
    • If the limit is .05 and there are .05 lots running and the amount of lots for open orders is reduced to .04, then .01 lots will be closed.  It should close the most recent trades that have been opened to satisfy this until complete

  • Limits the total number of lots that are in PENDING orders at a given time .  
    • This needs to be in increments of .01 and I don't think there needs to be an upper limit.  
    • If the limit is .05 and there are .04 lots pending and an order of .02 is added, then that .02 order should be closed.
      • however, if the pending order is changed from .02 to .01 then it is not closed by the EA.
    • If the limit is .05 and there are .05 lots running and the amount of lots for pending orders is reduced to .04, then .01 lots will be closed.  It should close the most recent trades that have been opened to satisfy this until complete

I don't need errors or popups but I would also need logging done to the MT4 journal section or something like that if possible.  This way I can find out if an order was closed due to not allowing enough open lots and other things like that.


I've done a mockup graphic of what the interface would look like along with some logic that might explain what I think it might look like.


Once it's completed I'd like to perform some tests to ensure that it works satisfactory.

Files:

PNG
mql5.png
86.4 Kb

Responded

1
Developer 1
Rating
(130)
Projects
151
23%
Arbitration
5
0% / 60%
Overdue
4
3%
Working
2
Developer 2
Rating
(5)
Projects
1
100%
Arbitration
4
0% / 75%
Overdue
0
Working
3
Developer 3
Rating
(45)
Projects
73
49%
Arbitration
1
0% / 0%
Overdue
1
1%
Working
Similar orders
can you build me a bot base on this strategy please The term "MartiScalper robot" likely refers to a type of automated trading system that combines two different trading strategies: Martingale and Scalping. Here's a breakdown of these strategies: 1. **Martingale Strategy**: This is a betting strategy that involves doubling the trade size after a loss, with the idea that an eventual win will recover all previous
The TurtleDashboard BOT (Expert Advisor) has the goal to provide to the trader a dashboard that summarises, for each symbol (currency pair for the Forex market), a set of technical indicators for a set of timeframes (the set of timeframes is always fixed - hardcoded). The dashboard is actually a simple Google Sheet Document, with one sheet and 38 columns. Once the BOT is started and running, every X minutes it
I am using pine script plot function there is offset value there , I need a pine script and mql code when. The close cross under or cross over the offset value line it generate an alert , it's not possible through plot function however could be done through other means do you know how to do it
I am looking for superb amazing fast MT4 EA coding service from a reliable skilled programmer, If you are the type that used to attend to messages after it client has been waiting so long or paying attention in the beginning then disappear for a while, not ready to provide timely updates and pay attention to details, don't apply as not to waste both our time, I begged you with the power that keep you alive, this is
hi guys, I have a script, that I have been struggling to work. most of the work is done, just final touch of an expert is needed. The script Is using Fibonacci and Pivot standard in its base. look forward to hear from an expert! Best regards Sina
Please give me a quote. 1. On Ea automatic take a trade, off Ea as indicator 2. News on/off 3. when to when (in arrange of time), once break up/down happened Ea will take a trade, spread on/off 4. Auto lot on/off, auto lot should be based on balance percentage. 5. Five of EMA for the trend direction 6. Tp & SL, ratio 1:1, 1:2, 1:3, After hit first TP, Trailing stop trigger, TP move to second TP Regards
Greetings. I will buy your EA for MT5, in case that on distance it is able to make a profit of 10% per month. Martingale methods and grid strategies should not be used as the basis of a trading strategy. I will need to test in the strategy tester and on live market (on demo account for at least two weeks), so I ask you to provide an executable demo file of the EA with necessary restrictions. The EA should not use
Hello, I have a file of different settings for a trading bot, I need a capable and trustworthy developer to execute the project perfectly without any mistake apply now if you are capable of carrying out the project
hello coders i need someone to create an ea with this condition: the ea has to start with open buy and sell order and after that use a grid with lot exponent 1,1.1,1.2,1.3 and etc. the ea has to start for example with sell and buy order with 0.05 lot or other that i can select on inputs but after that the grid has to start with 0.01 lots i need also a step grid option so i can select the distance from the grid
### **Indicators** 1. **Daily % Mover**: - Identify the symbol with the highest absolute percentage change for the day. This symbol will be the current traded symbol until another reaches #1. (The calculation is clarified in the file attached below) 2. **Range Bars**: - Construct Range Bars based on price movement rather than time. - Determine the “spread” data for all symbols. The minimum range bar size should be

Project information

Budget
30 - 50 USD
For the developer
27 - 45 USD