how to identify maximum draw down for every trade in meta trader ???
gozila:
how to identify maximum draw down for every trade in meta trader ???
Find where price has gone between "now" and OrderOpenTime() and calculate the DD.
how to identify maximum draw down for every trade in meta trader ???
gozila: how to identify maximum draw down for every trade in meta trader ???
For open orders, Sum OrderProfit() +OrderSwap() +OrderCommission() for all open orders.
For closed orders, from Could EA Really Live By Order_History Alone? - MQL4 forum
int tickets[], nTickets = GetHistoryOrderByCloseTime(tickets); double balances[]; ArrayResize(balances, nTickets+1); double prevBal = AccountBalance(); for(int iTck = 0; iTck < nTickets; iTck++) if( OrderSelect(tickets[iTck], SELECT_BY_TICKET) ){ double profit = OrderProfit() +OrderSwap() +OrderCommission(); balances[iTck] = prevBal; prevBal -= profit; } balances[nTickets] = prevBal; int iHiBal = ArrayMaximum(balances), iLoBal = ArrayMinimum(balances, iHiBal+1, 0); double hiBal = balances[iHiBal], loBal = balances[iLoBal], DD = hiBal-loBal;
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