function CEL_StartUp(Symbol1, Symbol2)

clc;
warning('off', 'MATLAB:dispatcher:InexactMatch');
format short g;

global m_CEL;

global m_CurFunc;

global m_Symbol1;
global m_Symbol2;

global m_OptionSymbol;

global m_UpdatesCount;
global m_LatencyTime;
global m_PlacedOrdersCount;

% *************************************************************************
% Variable initiation
% _________________________________________________________________________

% Checking correctness of arguments.
if nargin < 2
    error('Insufficient input arguments.');
elseif nargin > 2
    error('Too many input arguments.');
elseif isempty(Symbol1)
    error('Incorrect input argument "Symbol1"');
elseif isempty(Symbol2)
    error('Incorrect input argument "Symbol2"');
else
    m_Symbol1 = upper(Symbol1);
    m_OptionSymbol = ['C.' m_Symbol1];
    m_Symbol2 = upper(Symbol2);
    m_CurFunc = 'none';
    m_UpdatesCount = 0;
    m_LatencyTime = 0;
    m_PlacedOrdersCount = 0;
end

% *************************************************************************
% Establish & configure CQG connection
% _________________________________________________________________________

try    
    % Creating CQGCEL object.
    m_CEL = actxserver('CQG.CQGCEL.4');
    
    % Changing APIConfiguration of CQGCEL object.
    m_APIConfig = m_CEL.get('APIConfiguration');
    m_APIConfig.set('ReadyStatusCheck', 'rscOff');
    m_APIConfig.set('TimeZoneCode', 'tzCentral');
    m_APIConfig.set('UseOrderSide', true);
    m_APIConfig.set('UsedFromATLClient', true);
    m_APIConfig.set('CollectionsThrowException', false);
    
    % Specifies that Quotes and props parameters in InstrumentChanged event
    % contain collections with old values (for Orders only).
    m_APIConfig.set('NewInstrumentChangeMode', true);
    
    % Registering common callback listeners.
    m_CEL.registerevent({'DataConnectionStatusChanged' 'CEL_OnDataConnectionStatusChanged'; ...
                         'CELStarted' 'CEL_OnCELStarted'; ...
                         'LineTimeChanged' 'CEL_OnLineTimeChanged'; ...
                         'DataError' 'CEL_OnDataError'});
    
    % Registering callback listeners for Expression.
    m_CEL.registerevent({'ExpressionResolved' 'CEL_ExpressionResolved'; ...
                         'ExpressionAdded' 'CEL_ExpressionAdded'; ...
                         'ExpressionUpdated' 'CEL_ExpressionUpdated'; ...
                         'ExpressionInserted' 'CEL_ExpressionInserted'; ...
                         'ExpressionRemoved' 'CEL_ExpressionRemoved'});
    
    % Registering callback listeners for RealTimeData & Orders.
    m_CEL.registerevent({'InstrumentSubscribed' 'CEL_OnInstrumentSubscribed'; ...
                         'InstrumentChanged' 'CEL_OnInstrumentChanged'; ...
                         'IncorrectSymbol' 'CEL_OnIncorrectSymbol'});
    
    % Registering callback listeners for Orders.
    m_CEL.registerevent({'GWConnectionStatusChanged' 'CEL_OnGWConnectionStatusChanged'; ...
                         'AccountChanged' 'CEL_OnAccountChanged'; ...
                         'OrderChanged' 'CEL_OrderChanged'});
    
    % Registering callback listeners for TimedBars.
    m_CEL.registerevent({'TimedBarsResolved' 'CEL_OnTimedBarsResolved'; ...
                         'TimedBarsAdded' 'CEL_OnTimedBarsAdded'; ...
                         'TimedBarsUpdated' 'CEL_OnTimedBarsUpdated'; ...
                         'TimedBarsInserted' 'CEL_OnTimedBarsInserted'; ...
                         'TimedBarsRemoved' 'CEL_OnTimedBarsRemoved'});

    %Starting CQGCEL object.
    m_CEL.Startup;
    pause(2);
catch
    CEL_ShutDown;
    disp('An error occurred in CEL_StartUp.m file.');
end