I have a nice EA and would like to add the function where an order will close when it gets to a specific profit (dollars). I am trying OrderProfit()
but have no luck in getting the EA to respond. It's pretty simple. I want to enter a dollar amount into the EA settings, and when the profit
reaches that dollar amount I would like the order to close. I am very new to this, so I hope I am making sense. Can anyone give me a helping hand
please?
- MetaTrader 5 Built-in Trading Strategy Tester
- MQL5 Wizard: Development of trading robots for MetaTrader 5
- How to copy deals of successful traders in MetaTrader 5
Use:
AccountInfoDouble(ACCOUNT_PROFIT)
Fabio Cavalloni:
Use:
Thanks, I'll give that a go. Appreciated.
Fabio Cavalloni:
Use:
That works perfectly. Thank you so much.
hello , i want accounted only buy profit, can i use account "ACCOUNT_PROFIT"??

Documentation on MQL5: Constants, Enumerations and Structures / Environment State / Account Properties
- www.mql5.com
Account Properties - Environment State - Constants, Enumerations and Structures - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5

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