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
- Looking for something to secure trades when they've reached a daily level.
- Close all trades and take profit
- Hi
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
- 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.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register