function CEL_OnTimedBarsUpdated(Source, EventID, cqg_timed_bars, index_, varargin)

global m_CEL;
global m_UpdatesCount;

try
    
    RefreshTimedBars(cqg_timed_bars, index_);

    % Uncomment the next line to display the TimedBars or comment to hide them
    DisplayTimedBars(['Index ' num2str(index_ + 1) ' of symbol "' upper(cqg_timed_bars.Request.Symbol) '" was Updated at ' m_CEL.Environment.LineTime]);
    
    m_UpdatesCount = m_UpdatesCount + 1;
    
catch
    CEL_ShutDown;
    disp('An error occurred in CEL_OnTimedBarsUpdated.m file.');
end