Simple adjustment of trailing stop to consider POSITION_TICKET in hedge account

MQL5 Asesores Expertos

Trabajo finalizado

Plazo de ejecución 1 día

Tarea técnica

Hi coders,

This is simple. My trailing stop is not working in a Hedge account.

My CTrade Class (attached) was built for Netting accounts. Now I need to adjust it to Hedge accounts.

Thus I need to identify an opened position by POSITION_TICKET in order to avoid the following error while updating the trailing stop:

"10036 - TRADE_RETCODE_POSITION_CLOSED - Position with the specified POSITION_IDENTIFIER has already been closed"

For experienced coders, I think this is going to be very fast.

Thank you.

Daniel

Archivos adjuntos:

MQH
CTrade.mqh
55.6 Kb

Han respondido

1
Desarrollador 1
Evaluación
(879)
Proyectos
1392
67%
Arbitraje
117
32% / 42%
Caducado
215
15%
Libre
2
Desarrollador 2
Evaluación
(253)
Proyectos
358
49%
Arbitraje
24
25% / 50%
Caducado
80
22%
Libre
3
Desarrollador 3
Evaluación
(28)
Proyectos
36
17%
Arbitraje
5
20% / 40%
Caducado
17
47%
Libre
4
Desarrollador 4
Evaluación
(27)
Proyectos
28
54%
Arbitraje
4
0% / 50%
Caducado
5
18%
Libre
5
Desarrollador 5
Evaluación
(586)
Proyectos
1048
49%
Arbitraje
39
28% / 41%
Caducado
49
5%
Libre
Solicitudes similares
Profitable HFT 100 - 250 USD
I need a profitable HFT for forex XAUUSD , EURUSD , GBPUSD , OIL budget 100$ -250$ i want it work on both demo and live accounts mt4 mt5 urgent as soon as possible
Entry using the Half-trend indicator (amplitude 2 and channel deviation 2 as standard default). Needs to have as little lag and repainting as possible. Entry is buy or sell. There must not be more than one active trade at a time. The entry's must only be in a buy-sell-buy-sell-buy etc sequence. For example it cannot enter having 2 signals for buy and then sell, the entry must be alternate. This strategy has no stop
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px 'Helvetica Neue'; min-height: 15.0px} p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px 'Helvetica Neue'} Dear Developer , I am seeking to develop an Expert Advisor (EA) for forex trading with the following specific requirements. Your feedback on the feasibility and implementation of these requirements would be greatly appreciated: 1. **Objective**: - The EA
Edit MyFxBook Data 30 - 40 USD
Hello Everyone, How do I change data on my MT4 so that on MyFxBook it will be seen differently. Because I got a high Drowdown and some loss, I just simply want to hide this data. Please not from inspect because at the end it will be seen, directly from my MT4
I need someone to create an expert adviser that can execute trades using MACD signals. Someone that knows about MACD. When macd divergence and histogram divergence are bullish, Expert to execute long trade with trailing stop loss. Also, We Short When macd divergence and histogram divergence are bearish, with trailing stop loss
JOB CODE #2024 30 - 50 USD
A reliable coder will be required to add an indicator to existing ea The EA is already installed with two indicators Details of the task involved will be provided when you apply and other terms
Trading EA 500 - 1000 USD
I need a trading EA developer that is profitable. The developer must have fxbook records for at least 2 years. If there is no fxbook. Don't mess around. Thank you
This Bot will work on strategy which works using moving averages,RSI and candle stick pattern and what I want is that trade will execute when setup will form on both 30 min and 1 hr time frame trade will execute strategy needs all 4 parameters to be on right calculations to execute trade and I want some options where I can select risk to reward ratio to back test this strategy and some other parameters
I want to add lot Size filter in my MQ5 EA. based on account balance increseing lot size must be increseing and when balance decrese lot size also decresed..that's all i want
im going through my large stash of robots that ive built up over several years. this one seems to open a trade on every candle and closes in various ways, its currently set to only close the trades in profit. so there is a nice steady balance increase line and an equity line that lags behind but seems to increase nicely too. i want to try a few different methods of closing and controlling the vast amount of remaining

Información sobre el proyecto

Presupuesto
20 USD
Para el ejecutor
18 - 18 USD
Plazo límite de ejecución
de 1 a 2 día(s)