Download MetaTrader 5

Method Refresh() is empty...

To add comments, please log in or register
Do you want to learn MQL5? 300 articles will help you!
Kevin
44
Kevin 2011.02.13 14:09 

Hi Guys,

Method Refresh() is called in  CIndicators::Refresh(). but the method Refresh() in file Series.mqh is empty, why?  please advise.

//+------------------------------------------------------------------+
//|                                                   Indicators.mqh |
//|                        Copyright 2010, MetaQuotes Software Corp. |
//|                                        http://www.metaquotes.net/ |
//|                                              Revision 2010.10.17 |

//+------------------------------------------------------------------+
//| Refreshing of the data of all indicators in the collection.      |
//| INPUT:  no.                                                      |
//| OUTPUT: flags of updating timeframes.                            |
//| REMARK: flags are similar to "flags of visibility of objects".   |
//+------------------------------------------------------------------+
int CIndicators::Refresh()
  {
   int flags=TimeframesFlags();
//---
   for(int i=0;i<Total();i++)
     {
      CSeries *indicator=At(i);
      if(indicator!=NULL) indicator.Refresh(flags);
     }
//---
   return(flags);
  }

 ---------------------------------------------------------------------------------------------------------

//+------------------------------------------------------------------+
//|                                                       Series.mqh |
//|                        Copyright 2010, MetaQuotes Software Corp. |
//|                                        http://www.metaquotes.net/ |
//|                                              Revision 2010.10.17 |
//+------------------------------------------------------------------+ 

    virtual void      Refresh(int flags)        {                            }

MetaTrader 5 Trading Platform / MetaQuotes Software Corp.
  • www.metaquotes.net
MetaTrader 5 trading platform designed to arrange brokerage services in Forex, CFD, Futures, as well as equity markets
Ilyas
1206
Ilyas 2011.02.14 14:02  
You should read more about virtual functions.
It actually calls the overloaded by descendant of CSeries method
Kevin
44
Kevin 2011.02.16 20:11  
mql5:
You should read more about virtual functions.
It actually calls the overloaded by descendant of CSeries method

 

Noted. Thanks very much. ;) 

To add comments, please log in or register