I have searched mql5 and online and cannot find an ea which will close any trading position out at x percent of loss of one trade. from another ea like you can input magic number in their.
- ea close position in loss with magic number
- Anyone has Close Position EA ?
- keeping track of trades
Elliot Debonee:
I have searched mql5 and online and cannot find an ea which will close any trading position out at x percent of loss of one trade. from another ea like you can input magic number in their.
I have searched mql5 and online and cannot find an ea which will close any trading position out at x percent of loss of one trade. from another ea like you can input magic number in their.
Discover new MetaTrader 5 opportunities with MQL5 community and services
- www.mql5.com
Logging in to MQL5.com website
Please try use this code
void CloseProfitPartial() { for(int i = 0; i < PositionsTotal(); i ++) { if(eaposition.SelectByIndex(i)) { string PosSymbol = eaposition.Symbol(); double Profit = eaposition.Profit(); ulong ticket = eaposition.Ticket(); double volume = eaposition.Volume(); string comment = eaposition.Comment(); if(Profit >= TargetProfit && PosSymbol == _Symbol && volume > 0.01) { eatrade.PositionClosePartial(ticket,volume / 2); } } } }
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