unit Myc.Trade.Pipeline;

interface

uses
    Myc.Data.Pipeline,
    Myc.Trade.Types;

type
    TTradeConverter = record
        class function CreateTickAggregation(Timeframe: TTimeframe): TConverter<TDataPoint<Double>, TDataPoint<TOhlcItem>>; static;
        class function CreateOhlcAggregation(Timeframe: TTimeframe): TConverter<TDataPoint<TOhlcItem>, TDataPoint<TOhlcItem>>; static;
    end;

implementation

uses
    Myc.Trade.Pipeline.Impl;

class function TTradeConverter.CreateTickAggregation(Timeframe: TTimeframe): TConverter<TDataPoint<Double>, TDataPoint<TOhlcItem>>;
begin
    Result := TTickAggregation.Create(Timeframe);
end;

class function TTradeConverter.CreateOhlcAggregation(Timeframe: TTimeframe): TConverter<TDataPoint<TOhlcItem>, TDataPoint<TOhlcItem>>;
begin
    Result := TOhlcAggregation.Create(Timeframe);
end;

end.
