Files
MycLib/Src/Myc.Trade.DataPoint.pas
T
Michael Schimmel d282d2c40d TDataPoint<T> review
2025-06-11 08:53:30 +02:00

36 lines
647 B
ObjectPascal

unit Myc.Trade.DataPoint;
interface
uses
System.SysUtils;
type
// A specific data record structure for Ask and Bid prices.
TAskBidItem = packed record
Ask: Single;
Bid: Single;
end;
TDataPoint<T> = record
Time: TDateTime;
Data: T;
constructor Create(ATime: TDateTime; const AData: T);
end;
IMycStream<T: record> = interface
procedure Add(const Data: TDataPoint<T>);
end;
implementation
{ TDataPoint }
constructor TDataPoint<T>.Create(ATime: TDateTime; const AData: T);
begin
Time := ATime;
Data := AData;
end;
end.