Removed bottleneck in DataStream

This commit is contained in:
Michael Schimmel
2025-07-16 22:27:53 +02:00
parent 120c62083e
commit abad66ae52
4 changed files with 578 additions and 247 deletions
+8 -2
View File
@@ -111,7 +111,8 @@ type
class function CreateRecordField<S, T>(const FieldName: String): TConverter<S, T>; static;
class function CreateIdentity<T>: TConverter<T, T>; static;
class function CreateAggregation(Timeframe: TTimeframe): TConverter<TDataPoint<Double>, TDataPoint<TOhlcItem>>; static;
class function CreateTickAggregation(Timeframe: TTimeframe): TConverter<TDataPoint<Double>, TDataPoint<TOhlcItem>>; static;
class function CreateOhlcAggregation(Timeframe: TTimeframe): TConverter<TDataPoint<TOhlcItem>, TDataPoint<TOhlcItem>>; static;
class function CreateDataPointConverter<S, T>(const Func: TConstFunc<S, T>): TConverter<TDataPoint<S>, TDataPoint<T>>; static;
@@ -251,7 +252,7 @@ begin
Result := A.FConverter;
end;
class function TConverter.CreateAggregation(Timeframe: TTimeframe): TConverter<TDataPoint<Double>, TDataPoint<TOhlcItem>>;
class function TConverter.CreateTickAggregation(Timeframe: TTimeframe): TConverter<TDataPoint<Double>, TDataPoint<TOhlcItem>>;
begin
Result := TTickAggregation.Create(Timeframe);
end;
@@ -309,6 +310,11 @@ begin
Parent.Link(seq);
end;
class function TConverter.CreateOhlcAggregation(Timeframe: TTimeframe): TConverter<TDataPoint<TOhlcItem>, TDataPoint<TOhlcItem>>;
begin
Result := TOhlcAggregation.Create(Timeframe);
end;
class function TConverter.Parallel<T>(Parent: TDataProvider<T>): TConverter<T, T>;
begin
Result := TMycParallelConverter<T>.Create;