- open orders do not change AccountBalance
- There is no functon HistoryTotal()
- profit = OrderProfit() + OrderCommission() + OrderSwap()
- Check your return codes (OrderSelect) What are Function return values ? How do I use them ? - MQL4 forum and Common Errors in MQL4 Programs and How to Avoid Them - MQL4 Articles
Got the Code here: https://forum.mql4.com/62016
for(int i = OrdersHistoryTotal() -1; i >= 0; i--) { if(OrderSelect(i, SELECT_BY_POS, MODE_HISTORY)) { if (OrderType() == 6) { Comment("The Deposit Was ", OrderProfit(), " ", AccountCurrency()); } } }
But it works only when we have opened All History on History Tab.
is there any other solutions to get the intial deposit?
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
What wrong with this code?
I don't get the deposit amount. i want to find intial deposit amount to calculate the drawdown to avoid risk in trades to reduce drawdown.
Help on this issue.