Automatic MT4 TP update

 
Friends, I'm looking for a MT4 EA that can automatically set T/P (for each open trade individually) to take account of it's swap costs. So say, I open a trade and want to take TP of 10 pips, but if the trade continuous to open for a couple days, EA can automatically increase T/P to account for the increased swap cost and continues to update it daily so that the net profit remains 10 pips. I spent a a couple hours but couldn't find something in place already here. Please provide me any pointers or if something is there already? Thank you
 
Topics concerning MT4 and MQL4 have their own section.
In future please post in the correct section.
I have moved your topic to the MQL4 and Metatrader 4 section.

 
andy22222:
Friends, I'm looking for a MT4 EA that can automatically set T/P (for each open trade individually) to take account of it's swap costs. So say, I open a trade and want to take TP of 10 pips, but if the trade continuous to open for a couple days, EA can automatically increase T/P to account for the increased swap cost and continues to update it daily so that the net profit remains 10 pips. I spent a a couple hours but couldn't find something in place already here. Please provide me any pointers or if something is there already? Thank you

First, the Symbols in the open orders will be classified, then the cost will be calculated and additional pips will be added on it. Symbol classification is available here. you can do the other.

sample

  if(OrderType()==OP_BUY )

       {

        BOrderCost=BOrderCost+(OrderOpenPrice()+OrderSwap()OrderCommission())*OrderLots();

        BOrderQ=BOrderQt+OrderLots();

       }

(BOrderCost/BOrderQ)+10*Points // Cost+10 Pips

https://www.mql5.com/en/forum/370952#comment_22807855

How To Distinct OrderSymbol() In MQL4
How To Distinct OrderSymbol() In MQL4
  • 2021.06.09
  • www.mql5.com
How to distinct OrderSymbol() in MQL4? I have data: Symbol | Type | Size GBPUSD | Buy | 1.5 GBPUSD | Buy | 0...
 
Mehmet Bastem:

Please edit your post and use the code button (Alt+S) when pasting code.

EDIT your original post, please do not just post the code correctly in a new post.

Reason: