Added some standard indicators
This commit is contained in:
@@ -2,10 +2,10 @@ unit Myc.Trade.DataArray;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Myc.Trade.DataPoint;
|
||||
|
||||
type
|
||||
// A series is an array of values with the newest ite at index=0. Each series counts the total of added items since creation, but
|
||||
// it actually may contain less items, because the array size is limited by the lookback parameter, when adding items.
|
||||
// Series are immutable.
|
||||
TMycDataArray<T> = record
|
||||
private
|
||||
const
|
||||
@@ -21,7 +21,9 @@ type
|
||||
function GetItems(Idx: Int64): T; inline;
|
||||
public
|
||||
constructor Create(const AChunks: TArray<TChunk>; ACount, ATotalCount: Int64);
|
||||
// Add a singe item
|
||||
function Add(const Data: T; Lookback: Int64): TMycDataArray<T>; overload;
|
||||
// Add a ranmge of items
|
||||
function Add(const Data: array of T; First, Count, Lookback: Int64): TMycDataArray<T>; overload;
|
||||
class function CreateEmpty: TMycDataArray<T>; static;
|
||||
// Helper to create a data array from a raw TArray.
|
||||
|
||||
Reference in New Issue
Block a user