jtubbs13791: the function below only calculates the dollar amount of the last open trade. I am looking to calculate the dollar amount of all open trades for the currency the EA is on. I can not find what I am doing wrong. can I get some help? thanks in advance.
Don't double post
return(OrderProfit()+OrderSwap()+OrderCommission());
You are returning the first trade you find. If you want all open trade, sum them and return the sum.
Worldwide Fox #: Where is the other post? I want the same thing
If you click on his name, all messages, then you would have found Trying to calculate total profit for trades - Profit Trading - MQL4 and MetaTrader 4 - MQL4 programming forum
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
the function below only calculates the dollar amount of the last open trade. I am looking to calculate the dollar amount of all open trades for the currency the EA is on. I can not find what I am doing wrong. can I get some help? thanks in advance.