Download MetaTrader 5

Method Refresh() is empty...

To add comments, please log in or register
Kevin
44
Kevin  

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. |
//|                                        https://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. |
//|                                        https://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
1201
Ilyas  
You should read more about virtual functions.
It actually calls the overloaded by descendant of CSeries method
Kevin
44
Kevin  
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