DataFeed-Producer

This commit is contained in:
Michael Schimmel
2025-12-09 11:12:56 +01:00
parent e56bf7ee7d
commit 43afbd6050
2 changed files with 34 additions and 34 deletions
+5 -5
View File
@@ -114,7 +114,7 @@ type
FProcessDone: TState;
FApplication: IAuraApplication;
FModulesItem: TTreeViewItem;
FTickerServer: IScalarBatchServer;
FFeed: IScalarRecordFeed;
function SelectedSymbol: String;
procedure ExecuteStrategy(const Symbol: String; Timeframe: TTimeframe; const Consumer: IConsumer<TDataPoint<TOhlcItem>>);
@@ -382,11 +382,11 @@ begin
var terminated := TFlag.CreateObserver(FTerminate.Signal).State;
var path := '\\COFFEE\TickData\Pepperstone'; // Or FServer.Path if compatible
FTickerServer := TScalarBatchServer.Create(path, '.m1', true, def) as IScalarBatchServer;
FFeed := TScalarRecordFeed.Create(path, '.m1', true, def);
// Converter: Transforms raw IRecordSeries (Columns) into TArray<TDataPoint>
var ticker :=
FTickerServer.Ticker.Chain<TDataPoint<Double>>(
FFeed.Ticker.Chain<TDataPoint<Double>>(
function(const Tick: IScalarRecord): TDataPoint<Double>
begin
Result.Time := Tick.ItemByIndex(iTime).Value.AsDouble;
@@ -404,7 +404,7 @@ begin
TAlphaColors.Orange
);
FTickerServer.SetImportOptions(
FFeed.SetImportOptions(
SizeOf(TM1FileItem),
procedure(const Src: Pointer; Dst: TScalar.PValue)
var
@@ -428,7 +428,7 @@ begin
);
// Connect pipeline: Server -> Converter
FProcessDone := FTickerServer.ProcessData(symbol, terminated);
FProcessDone := FFeed.ProcessData(symbol, terminated);
end;
function TForm1.CreateStrategy2(Timeframe: TTimeframe): IConsumer<TDataPoint<TOhlcItem>>;