Download MetaTrader 5
To add comments, please log in or register
The Market has more than 400 indicators. Try any of them!
MetaQuotes Software Corp.
MetaQuotes Software Corp. 2011.02.13 18:53 

New article Trade Events in MetaTrader 5 is published:

A monitoring of the current state of a trade account implies controlling open positions and orders. Before a trade signal becomes a deal, it should be sent from the client terminal as a request to the trade server, where it will be placed in the order queue awaiting to be processed. Accepting of a request by the trade server, deleting it as it expires or conducting a deal on its basis - all those actions are followed by trade events; and the trade server informs the terminal about them.

Generation of Trade Events

Author: MetaQuotes

NFTrader 2011.02.14 18:44  
Links are for the russian site!
NFTrader 2011.02.14 22:18  
Nice article indeed.
noonehastherighttojudgeanother 2011.04.17 02:53  
void CheckStartDateInTradeHistory()
//--- initial interval, as if we started working right now
   datetime curr_start=TimeCurrent()-days*PeriodSeconds(PERIOD_D1);
//--- make sure that the start limit of the trade history has not gone 
//--- more than 1 day over intended date
      //--- we should correct the start date of history to be loaded in the cache 
      PrintFormat("New start limit of the trade history to be loaded: start => %s",

      //--- now load the trade history for the corrected period again

      //--- correct the number of deals and orders in the history for further comparison

see the last two lines?

should they be:

history_orders=HistoryOrdersTotal();  // okay, looks correct

deals=HistoryDealsTotal();  //a typing error, perhaps? 


Umer Aziz Malik
Umer Aziz Malik 2012.02.13 07:01  

Thanks a lot. This really helped me solve some confusions.


Umer Aziz  

To add comments, please log in or register