How to Get the Intial Deposited Amount? I tried But!!!
- 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?
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.