TSeries + DataEndpoint
This commit is contained in:
@@ -21,6 +21,13 @@ type
|
||||
constructor Create(AOpen, AHigh, ALow, AClose, AVolume: Double);
|
||||
end;
|
||||
|
||||
// Represents a time-stamped data point in a series.
|
||||
TDataPoint<T> = record
|
||||
Time: TDateTime;
|
||||
Data: T;
|
||||
constructor Create(ATime: TDateTime; const AData: T);
|
||||
end;
|
||||
|
||||
TConstFunc<S, T> = reference to function(const Value: S): T;
|
||||
|
||||
implementation
|
||||
@@ -44,4 +51,12 @@ begin
|
||||
Volume := AVolume;
|
||||
end;
|
||||
|
||||
{ TDataPoint<T> }
|
||||
|
||||
constructor TDataPoint<T>.Create(ATime: TDateTime; const AData: T);
|
||||
begin
|
||||
Time := ATime;
|
||||
Data := AData;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
Reference in New Issue
Block a user