function CEL_StartUp(Sym1, Sym2)
clc;
global m_CEL;
global m_Symbol1;
global m_Symbol2;

% Checking correctness of arguments.
if nargin < 2
   error('Insufficient input arguments.');
elseif nargin > 2
   error('Too many input arguments.');
end
if isempty(Sym1) || isempty(Sym2)
   error('Incorrect input argument.');
else
   m_Symbol1 = Sym1;
   m_Symbol2 = Sym2;
end
    
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('UsedFromATLClient', true);
    m_APIConfig.set('CollectionsThrowException', false);
    
    % Registering callback listeners.
    m_CEL.registerevent({'DataConnectionStatusChanged' 'CEL_OnDataConnectionStatusChanged'});
    m_CEL.registerevent({'CELStarted' 'CEL_OnCELStarted'});
    m_CEL.registerevent({'DataError' 'CEL_OnDataError'});
    m_CEL.registerevent({'ExpressionUpdated' 'CEL_ExpressionUpdated'});
    m_CEL.registerevent({'ExpressionResolved' 'CEL_ExpressionResolved'});
    m_CEL.registerevent({'ExpressionAdded' 'CEL_ExpressionAdded'});

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