Chart panels

This commit is contained in:
Michael Schimmel
2025-07-13 16:57:58 +02:00
parent 6e5c0de876
commit 840904e42d
9 changed files with 358 additions and 250 deletions
+2 -36
View File
@@ -5,25 +5,10 @@ interface
uses
System.TimeSpan,
Myc.Signals,
Myc.Core.Notifier;
Myc.Core.Notifier,
Myc.Trade.Types;
type
// A data record for an Ask/Bid price pair.
TAskBidItem = packed record
Ask: Double;
Bid: Double;
constructor Create(AAsk, ABid: Double);
end;
TOhlcItem = record
Open: Double;
High: Double;
Low: Double;
Close: Double;
Volume: Double;
constructor Create(AOpen, AHigh, ALow, AClose, AVolume: Double);
end;
// Represents a time-stamped data point in a series.
TDataPoint<T> = record
Time: TDateTime;
@@ -295,25 +280,6 @@ begin
Result := Self.Convert<Single>(function(const Ohlc: TDataPoint<TOhlcItem>): Single begin Result := Ohlc.Data.Volume; end);
end;
{ TAskBidItem }
constructor TAskBidItem.Create(AAsk, ABid: Double);
begin
Ask := AAsk;
Bid := ABid;
end;
{ TOhlcItem }
constructor TOhlcItem.Create(AOpen, AHigh, ALow, AClose, AVolume: Double);
begin
Open := AOpen;
High := AHigh;
Low := ALow;
Close := AClose;
Volume := AVolume;
end;
{ TDataPoint<T> }
constructor TDataPoint<T>.Create(ATime: TDateTime; const AData: T);