Initial Deposit - page 2

 

TesterStatistics(STAT_INITIAL_DEPOSIT) 

 
Really, brokers change the comments? I was think they don't change anything
 
trend: Really, brokers change the comments? I was think they don't change anything
brokers can change comments, including complete replacement.
 
Ian Venner #:

I use the comment field as part of my failure recovery too I am beginning to wonder if maybe thats not such a good idea as I keep hearing how brokers change the comment i might go back to my original idea which was to use the magic number field.

Hi

This is my suggestion:



   double deposit=AccountBalance();
   for(int i = OrdersHistoryTotal()-1; i >= 1; i--){
      if(OrderSelect(i,SELECT_BY_POS,MODE_HISTORY))
           deposit  -=  (OrderProfit()+OrderSwap()+OrderCommission());
   }
   
   Print(deposit);
  } //+----
Quick script for testing all history, and indeed the first one is the Deposit.
Reason: