How To?
hi all
How i obtain the initial deposit in account for statistical questions?
regardsInitialDeposit = AccountBalance() - AccountProfit()
ok, is this same
tanks...
InitialDeposit = AccountBalance() - AccountProfit()
deposit 5000
profit +1000
deposit +1000
profit +1000
AccountBalance() - AccountProfit() = 8000 - 2000 = 6000 != 5000 
#define OP_BALANCE 6
int cnt = OrdersHistoryTotal();
for (int i=0; i<cnt; i++)
{
if (!OrderSelect(i, SELECT_BY_POS, MODE_HISTORY)) continue;
if (OrderType() == OP_BALANCE)
{
Alert(OrderProfit());
break;
}
}
And do not forget to set Show All History option.
hi all
How i obtain the initial deposit in account for statistical questions?
regards