I need help to make my EA work as well live as it does demo.
The EA is synced to 4m charts and that works well.
Code and setfiles will be supplied.
Thanks.
This is what Claude AI say is the issue? IDK
Looking at this codebase from a developer perspective, I can see several architectural and implementation issues that would cause demo vs live performance divergence:
Core Architecture Problems
1. Race Condition in State Management The EA maintains multiple global state variables ( consecutiveLosses , breakoutCount , usingAdaptiveSettings ) that are modified across different event handlers ( OnTick , OnTradeTransaction , CheckClosedTradesInHistory ). In live environments with higher tick frequency, these create race conditions where state changes can be lost or duplicated.
2. Inconsistent Event Processing You have duplicate trade monitoring logic in both OnTradeTransaction and CheckClosedTradesInHistory . This creates a scenario where the same trade result might be processed twice, causing incorrect state transitions. Demo environments are more predictable, masking this issue.
3. Handle Management Anti-Pattern The indicator handles are being recreated dynamically in ApplySettings() , but there's no proper synchronization to ensure the new handles have valid data before they're used. The sleep-and-retry pattern is a code smell that suggests timing dependencies.
Data Reliability Issues
4. Unsafe Buffer Operations Your buffer copying operations assume data availability without proper validation:
cpp
// Pattern seen throughout - assumes success
CopyBuffer(handle, 0, 0, 2, values) == 2
Live feeds have more data gaps and timing inconsistencies than demo feeds.
5. Historical Data Dependencies The core logic relies heavily on historical price lookups ( iHighest , iLowest , iTime ) without checking data completeness. Live brokers often have different historical data depth and quality.
6. Timeframe Synchronization Assumptions The isNewBar() logic assumes consistent bar timing across timeframes, but live servers can have bar boundary variations that don't exist in demo environments.
Execution Model Flaws
7. Synchronous Execution Assumptions The trade execution model assumes immediate order processing and position updates. The retry logic in executeTrade() is primitive and doesn't handle partial fills or order state transitions properly.
8. Event Ordering Dependencies The adaptive switching logic depends on trade events being processed in a specific order. Live environments have more complex event sequences that can break these assumptions.
9. Price Data Staleness Multiple price lookups throughout the execution path ( SymbolInfoDouble calls) can return stale data in fast-moving live markets, leading to inconsistent calculations within the same tick.
Similar orders
Hi In my current EA, you have to modify this robot in Instagram & Facebook. Select option 1 and 2 to create robots. My old Robot Pentang Order is designed to put only in order so you will be easy to change. 2 in 1 I have my existing EA like this in which you have to modify this robot in Instagram & Facebook 2 videos must create robots with the select option 1&2 my video link is attached rar file and is clearly
I am looking for an experienced MQL5 developer to create a fully automatic MT5 Expert Advisor (EA) for frequent small-profit trades. My current manual strategy is simple: I watch short-term price movement, enter when price starts moving strongly up or down, and close once a small profit is achieved. I want an EA that can identify these movements and automatically repeat this process throughout the day. Main
Code the indicator to MT5 EA, include all the inputs variables and values Allow live trading Allow demo trading Allow strategy tester Bar shift 0 adjustable Allow indicator to show on strategy tester Lot size adjustable Max spread in points (0=disable) Use stop loss circle true or false Stop loss circle in points adjustable Use stop loss true or false Stop loss in points (adjustable) Take profit true or false Use
Hi All, Looking for a ready to TEST and USE EA which makes $20 per day with initial deposit of $100 only with controlled drawdown and no trades during news time. Please note: Budget is fixed and no trial and hit error for testing and developing EA as I do not have time. I will select the developer only after the TEST is successful only, do not force to select and make the payment and payment will be done once I am
Create a bot that can trade and read indicators easy to read for first time users. Bot that can be used on a phone and connect to MT5. It should be easy to install or use on any device especially phone and laptop, preferably the bot that can run over night and controllable when needed
Need Grid + Martingale Type Averaging EA ( Directional Buy or Sell entry then uses grid/martingale for Recovery if need ) * Must Work Buy + Sell Both Side ( Do not Open Buy or Sell at Once Let the Previous Order Close ) * Min Lot size 0.01 * Max Lot Size 1 ( Can be Edited to maximum ) * Auto TP Shift * Auto Averaging Position also Auto Shift TP as per Averaging * After Averaging Close the Trade in Maximum Profit (
C'est un Expert Advisor (EA) MQL5 pour MetaTrader 5, conçu pour l' XAUUSD , combinant un filtre de tendance et une grille adaptative avec gestion de panier ("basket") et protections contre le drawdown. Version 1.00. Logique de trading Filtre de tendance (H4 par défaut) • EMA rapide (50) vs EMA lente (200) pour déterminer la direction (UP/DOWN) • Filtre ADX (période 14, seuil 18) pour éviter de trader en
I have 2 trading view indicators by GainzAlgo that I want code to mt5 , could u advise? I need you to give me response if you can convert This
Looking for an MT4/MT5 independent risk-management service or system that can monitor and automatically close trades opened and managed by another trader’s EA. The existing EA continuously removes/overrides manually added Stop Losses and may also override SLs placed by another EA. I need a solution that does not rely on modifying the existing trade or placing a Stop Loss. Instead, it should independently monitor each
I currently sell a white-label XAUUSD EA, but the existing supplier owns the source code. I now need a new, independently developed EA and licensing system that my company fully owns and controls. I am not requesting decompilation or copying of proprietary code. Existing settings, presets and trading examples will be provided as reference. The developer must first identify any missing strategy rules before