image thumbnail
from Scrolling display by Dimitri Shvorob
(price/volume chart)

Trade
classdef Trade < event.EventData
    
    properties (SetAccess = private)
        Size
        Price
        Time
    end         
    
    methods
        
        function[obj] = Trade(size,price)             
            obj.Size  = size;
            obj.Price = price;
            obj.Time  = now;
        end
        
        function[out] = char(obj)             
            out = sprintf('Trade: %f at %f',obj.Size,obj.Price);
        end
    
    end   
    
end

Contact us at files@mathworks.com