Identify Partially Closed Orders for a Floating Profit Function

MQL5 Indicators Experts C++ Forex

Job finished

Execution time 6 days
Feedback from customer
Great developer, very patient, skilled and able to complete complex requests
Feedback from employee
Great & honest Customer.. good luck

Specification

I had some code converted from MT4 to MT5.


The main function of the EA is that when a certain level of floating drawdown is hit e.g. -$500, the total lot size of those positions are reduced by a specified level e.g. 40% and all the trades in that sequence are modified to breakeven. To achieve this I used the following function (OrderClose()), which also adjusts the trade comment to "to #Order Ticket" or "from #Order Ticket" (e.g. "to #197639979"). So what I have left after running these function is a bunch of trades at Break Even with a trade comment like "to #19639979". In addition to this I have a dynamic take profit function that takes the profit a specified symbol sequence (e.g. EURUSD sells).

After the floating loss has been triggered, I have a grid EA which may open new trades these new trades will have a certain comment and the modified orders will have a "to #19639979" comment. What I have been able to do is separate the take profit for the modified and unmodified orders by specifying a specific trade comment. This is because I take profit for all the orders apart from the following: StringSubstr(OrderComment(),0,4)!="to #" || StringSubstr(OrderComment(),0,4)!="from #".


Here is an explanatory video to demonstrate why this is important: https://drive.google.com/file/d/12IYFl5dcxLObdoQAEGJW10iIx4nVCwxw/view


############# REASON FOR REQUEST ####################### For MT5 it is not possible to modify the trade comment of an order, as a result the solution stated above does not work for it. What I need is a solution to identify the modified and unmodified orders without looking at a specific trade comment.


Please read this description, watch the video.


Code will then be provided.


Thanks

Responded

1
Developer 1
Rating
(176)
Projects
235
46%
Arbitration
17
82% / 12%
Overdue
35
15%
Working
2
Developer 2
Rating
(298)
Projects
427
26%
Arbitration
18
61% / 33%
Overdue
26
6%
Free
3
Developer 3
Rating
(140)
Projects
203
80%
Arbitration
17
29% / 47%
Overdue
10
5%
Working
Similar orders
I have an EA and want to add few new logic to fetch profit taking factors and other values from an external master data and use it in existing EA
My trust wallet was hacked and I have tokens to claim which unlock almost daily but the person who hacked the wallet drains the tokens as soon as I claim them in the hacked wallet. I have contacted the support for that crypto but they were not helpful. There is no way to claim this crypto to another wallet. I need a bot or another solution that can transfer the crypto out of the hacked wallet into my other wallet as
I want a program that will help calculate and enter the market on full margin for me. I just need to put in the price for entry, Stop loss and TP then it will calculate the lot sizes for entering the trade on full margin on Mt5
I want to design a website like https://www.ngnrates.com/ we will change some stuff but not much, if you can deliver a website like this let me know your budget and readiness to implement
Hi, I need a robot, which wil get instructions to trade in 3 symbols at the same time based on few parameters and calculations. Example: There is 1 symbol called Gold-Near and the rate for it is 1000-1002 If i specify that when the rate reaches 1050, it should sell 1 lot Upon execution it will have to sell 1 lot of cme gold, buy 3 lots of mcx gold and buy currently (lots will be based on calculation). All the
I have a full code ,, There are some errors in this.It does not add to the chart, does not show arrow marks, does not alert ,, fix this problem and work properly,, Contact on telegram @Gw_rakib1
Hey, great developer I have a thinkorswim script I want to convert it into TradingView. Can you please let me know if you can i will be looking for great developer that will bid for it best regards
Hey, great developer I have a thinkorswim script I want to convert it into TradingView. Can you please let me know if you can i will be looking for great developer that will bid for it best regards
Tradingview developer 30 - 35 USD
Hey greetings. I am in need of tradingview developer that can modify an open source PineScript indicator code to add additional features. Kindly bid for this project if it is what you handle and let proceed with the project
hi. I hv a strategy on tradingview need to convert to MT4/MT5 expert advisor for algo trading. would like to add some tradingview strategy setting to the EA(not included in my tradingview code): recalculate after order is filled, order size: xx% of equity

Project information

Budget
30+ USD
For the developer
27 USD