function CEL_OrderChanged(Source, EventID, Change, Order, OldProperties, Fill, Cqgerr, varargin)

global m_OrderID;
global m_PlacedOrdersCount;

try
    % Informing about order's status.
    if strcmp(m_OrderID, Order.GUID)
        
        m_PlacedOrdersCount = m_PlacedOrdersCount + 1;
        
        if Change == 0
            disp('The order has been placed.');
        end
        
        if Order.IsFinal
            disp(['The order is final. Its GWStatus is: ', Order.GWStatus]);
            m_OrderID = '';
        end
        
    end
catch
    CEL_ShutDown;
    disp('An error occurred in CEL_OrderChanged.m file.');
end