Freelance Task — EA Recovery Layer Hello. I have a ready-made MQL5 EA. The signals, SL/TP and lot calculation should essentially not be touched. I need a recovery system added.
I am not a programmer — below is how the robot should behave.
Entry only from an EA signal. Stop-loss is not a new signal.
Trailing is already built into my EA — recovery does not implement its own trailing. If trailing is disabled, recovery must not work.
The normal lot remains whatever the EA already calculates (fixed or percentage of the account). Recovery only increases the next lot after a loss.
Take the actual closing amount of the trade (profit, commission, swap, fee). This is the debt that needs to be recovered.
The next lot is calculated as follows: divide the debt by the entered number of parts, then add the minimum profit that the trailing normally protects on the normal lot (trailing start minus the distance to the price).
Based on this ratio, increase the lot relative to the normal EA lot.
Example: if the normal lot is 0.01 and the calculation gives approximately 0.04, use 0.04. The lot must be adjusted to the broker’s lot step.
The number of parts is only used to calculate the lot. It does not mean that there must be exactly that many trades.
There are limits: the maximum recovery lot and the maximum debt for which the formula is allowed to increase the lot. If the debt is larger, the lot does not increase further. Recovery is not disabled.
The increased lot is locked. Until the cycle ends, the lot does not decrease after profitable trades.
Remove from the debt everything that this trade actually earned, not the “theoretical part”.
With every profitable recovery position, add another identical minimum trailing profit on the normal lot to the target.
The cycle ends when the recovery profits have covered the initial loss and this minimum profit for every profitable position. Then the normal lot is used again.
Examples. Loss = 5, minimum trailing profit on 0.01 = 0.50, locked lot = 0.04:
· three times +2.5 → ends after the third;
· +4 and +3 → ends after the second;
· one +5.90 → ends immediately.
If there is another loss during the cycle, the debt increases, a new cycle starts, and a new lot is calculated.
Input: lock the lot during the cycle (default should be enabled) or recalculate the lot after a profit (then it can decrease).
Also: enable/disable recovery, number of parts for lot calculation, maximum lot, maximum debt for the formula, and whether a new loss starts the cycle again.
Add three rows to the existing EA panel:
· Recovery status (disabled / waiting / cycle active and number of calculation steps);
· Current debt;
· Next lot.
Increase the background height so that the rows fit. Do not touch the other fields.
After an MT5 or VPS restart, the debt and locked lot must not be lost.
Do not use files. Store the state in Terminal Global Variables.
If they disappear or are invalid (different account, different magic, different symbol), restore the state after startup from this EA’s trade history.
In the Tester, every run starts from zero, without live cache.
After the work
It compiles. In the Tester: after a loss, the next signal uses a larger lot; after a profit, the lot remains unchanged; the cycle closes as in the examples; the panel shows the debt and next lot; after a terminal restart, the state rema.
Similar orders
Hey guys, I’ve got an MT4 HFT EA that’s showing strong results on an IC Markets demo account, and I'm looking to move it over to MT5. Does anyone have a solid MT5 version that performs well on IC Markets? Having the source code (MQL5) included would be awesome. Thanks for any leads
Most of the expert is already coded . Create a panel to show the Ratio for the Range . Trigger is based on ratio . Show Distribution / project starts after we clear Distribution
I am looking for an experienced MQL5 developer who can BOTH research trading strategies and develop a commercial-quality MetaTrader 5 Expert Advisor. This is NOT simply a coding job. The developer is free to choose the trading logic, indicators, entry method, exit method, timeframe architecture and strategy type. I do not require the EA to copy or resemble any existing commercial EA. My priority is: ROBUST LONG-TERM
Project Description I am looking for an experienced MQL5/MT5 Expert Advisor developer to develop an automated trading EA for XAUUSD on the M3 timeframe , running on an Exness account . The EA will automate a manual strategy based on SNR/GAP zones , using two setup types: Price Rejection Price Correction The EA should identify valid BUY/SELL setups around predefined SNR/GAP areas, apply configurable RSI, SMA, EMA and
I need an MT5 Expert Advisor for XAUUSD (Gold) running on an Exness account. STRATEGY LOGIC The exact entry and exit rules will be provided in writing before development starts. Please quote for a single rule-based strategy with clearly separated logic, so the rules can be adjusted later without rewriting the whole EA. RISK MANAGEMENT (this is the priority of the project) - Risk per trade as a percentage of account
Hello Traders, Have a trading strategy or idea you want to automate? I specialize exclusively in MQL5 development, helping traders turn their concepts into professional trading solutions. Custom Expert Advisors — automate your strategy and reduce manual execution Custom Indicators — transform your market ideas into powerful trading tools Fix & Debug — identify errors and get your existing code working properly
I am looking for a Senior MQL5 Developer to create a new MetaTrader 5 Expert Advisor from scratch. I will provide a complete Requirements Specification containing objective entry, exit and risk-management rules. This is not a request to copy or decompile an existing product. Project requirements: Clean and modular MQL5 source code. Exact implementation of the supplied strategy. One signal evaluation per configured
Hi i need help to connect my chat gtp with ninja trader I have all tools. Just need supervision and seeking a professional who can do that for me. This the bridge extension https://crosstrade.io/blog/chatgpt-to-ninjatrader-mcp-walkthrough
Hello everybody, I'm looking for an experienced MQL4/MQL5 developer to optimize a High-Frequency Trading (HFT) Expert Advisor for both MT4 and MT5. The EA performs consistently and profitably on demo accounts, but when it is run on Raw and Standard live accounts under what appear to be the same trading conditions, it begins generating losses. I do not have the original source code (.mq4/.mq5); I only have the
looking for a highly experienced mql5 developer to build a professional trading ea based on multi timeframe top down analysis and market structure concepts the system should combine higher timeframe context with lower timeframe execution and provide both precise logic and clean visual representation on chart ⸻ core requirements • implementation of multi timeframe logic higher timeframe bias combined with lower