Trouble Closing Specified Deal/ Position- Please Identify and Fix Error

Job finished

Execution time 21 hours
Feedback from customer
Quick turnaround, solved my problem. Happy with results. Thanks Nguyen Nga.

Specification

Hi there,


Please Identify and Fix:

Expert advisor (EA) cannot close specified deal/ position.

The error is 4756.

It currently has no problems opening positions, but the position ticket- PositionGetTicket(i), remains the same for both opening position and hedging in opposite direction on the same symbol.
I am using demo hedging mode.


A Successful Fix:


A successful fix would mean the EA will be able to open and close specified deals/ positions without error accordingly, with a unique Position Ticket Numbers assigned to each deal.

I need the separate Position Ticket Number as I intend to use TRADE_ACTION_CLOSE_BY to close specific deals, for example, closing the hedged position first/ only, and/or then the original position.

As I do not quite understand .mq5, I am open to other alternatives that is correct where I may be wrong, as long as it works and it can be explained to me.

Code will be shared with selected Developer to troubleshoot.

Full copyrights belong to client.

Thank you.

Responded

1
Developer 1
Rating
(253)
Projects
358
49%
Arbitration
24
25% / 50%
Overdue
80
22%
Free
Similar orders
GALAXYGOLD EA 30 - 36 USD
I am looking for a developer to build an Expert Advisor (EA) with strict performance and delivery standards. The EA must demonstrate at least 85%+ win rate in backtests or demo runs. Delivery must be completed within the agreed timeframe (the days we set together). If you cannot meet these requirements, please do not apply. If you foresee delays, you must inform me beforehand — not after deadlines have passed. The EA
I need an experienced trading-data specialist who can help me obtain 3–4 years of historical market data compatible with NinjaTrader 8 . The data will be used for trading strategy development, backtesting, and analysis
I am looking for an experienced MQL5 developer to develop a custom Expert Advisor (EA) for MetaTrader 5, primarily for XAUUSD (Gold) . The EA will be based on a proprietary price-action trading strategy that I have already defined. The objective is to translate this strategy into a fully automated, precise and reliable trading system without modifying its underlying logic. The strategy involves specific
Need aggressive M1 gold scalper rewrite of Dev3 + 8 strategies. INPUTS: RiskPercent=3, TP=400, SL=300, MaxTrades=6, Mode=BOTH, DailyProfit 15%, DailyLoss -10% LOT = Balance * RiskPercent / 1000 - works for Cent R350 and $1000. 8 STRATEGIES any true = open instantly, check 1 sec: 1 EMA8/21 cross 2 RSI14 30/70 + engulf 3 Engulfing candle 4 BB 20,2 breakout 5 FVG grab M1 6 M5 trend + M1 entry 7 Wick rejection >2 8
I need an experienced MQL5 developer to build a prototype MT5 Expert Advisor called RiskLock. The software should enforce user-defined trading risk rules before trades are executed. It should support risk percentage or fixed monetary risk, calculate position size using account equity, entry price, stop loss, tick value and contract specifications, block or reduce oversized trades, and include daily loss limits
I am looking for an experienced MQL5 Expert Advisor (EA) developer to analyze an existing trading setup and develop a similar automated trading robot. Project Overview I have access to a demo trading account where trades are being executed automatically. The trading results look very promising, but I do not know exactly what strategy, logic, indicators, or trade-management rules are being used. I will provide access
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
Expert Advisors 300+ USD
double CRiskManager::CalculateLotSize(double slPoints) { double balance = AccountInfoDouble(ACCOUNT_BALANCE); double riskMoney = balance * (m_riskPercent / 100.0); double tickValue = SymbolInfoDouble(_Symbol, SYMBOL_TRADE_TICK_VALUE); double tickSize = SymbolInfoDouble(_Symbol, SYMBOL_TRADE_TICK_SIZE); double pointValue = tickValue / tickSize; double lot = riskMoney / (slPoints * pointValue);
i share my strategy i need a bot trending bot fo mt5 . i attached the photo with this it help to make bot. it basicly 1 hours time frame base. i try but failed to make it
Title: Simple background trading bot for my Oanda account (v20 REST API) Overview Hi, I need a simple, lightweight event based standalone trading bot that connects directly to my Oanda account using broker’s standard REST API (V20 account) via VPS The bot just needs to look at group of 5 currency pairs (manually selectable and adjustable) in different 4 baskets, do some basic percentage math every period, and place

Project information

Budget
30+ USD
Deadline
to 10 day(s)