Type System
This commit is contained in:
@@ -21,7 +21,7 @@ type
|
||||
TSMA = class
|
||||
strict private
|
||||
class var
|
||||
FFactory: IDataMethodValue;
|
||||
FFactory: TDataMethodValue;
|
||||
class constructor CreateClass;
|
||||
public
|
||||
type
|
||||
@@ -39,7 +39,7 @@ type
|
||||
class function CreateSMA(Period: Integer): TConvertFunc<Double, Double>; static;
|
||||
|
||||
// Provides the factory method for this indicator as a data value.
|
||||
class property Factory: IDataMethodValue read FFactory;
|
||||
class property Factory: TDataMethodValue read FFactory;
|
||||
end;
|
||||
|
||||
[IndicatorName('EMA', 'Exponential Moving Average')]
|
||||
@@ -47,7 +47,7 @@ type
|
||||
TEMA = class
|
||||
strict private
|
||||
class var
|
||||
FFactory: IDataMethodValue;
|
||||
FFactory: TDataMethodValue;
|
||||
class constructor CreateClass;
|
||||
public
|
||||
type
|
||||
@@ -64,7 +64,7 @@ type
|
||||
class function CreateFactory: TIndicatorFactoryProc<TParams, TArgs, TResult>; static;
|
||||
class function CreateEMA(Period: Integer): TConvertFunc<Double, Double>; static;
|
||||
// Provides the factory method for this indicator as a data value.
|
||||
class property Factory: IDataMethodValue read FFactory;
|
||||
class property Factory: TDataMethodValue read FFactory;
|
||||
end;
|
||||
|
||||
[IndicatorName('WMA', 'Weighted Moving Average')]
|
||||
@@ -72,7 +72,7 @@ type
|
||||
TWMA = class
|
||||
strict private
|
||||
class var
|
||||
FFactory: IDataMethodValue;
|
||||
FFactory: TDataMethodValue;
|
||||
class constructor CreateClass;
|
||||
public
|
||||
type
|
||||
@@ -89,7 +89,7 @@ type
|
||||
class function CreateFactory: TIndicatorFactoryProc<TParams, TArgs, TResult>; static;
|
||||
class function CreateWMA(Period: Integer): TConvertFunc<Double, Double>; static;
|
||||
// Provides the factory method for this indicator as a data value.
|
||||
class property Factory: IDataMethodValue read FFactory;
|
||||
class property Factory: TDataMethodValue read FFactory;
|
||||
end;
|
||||
|
||||
[IndicatorName('HMA', 'Hull Moving Average')]
|
||||
@@ -97,7 +97,7 @@ type
|
||||
THMA = class
|
||||
strict private
|
||||
class var
|
||||
FFactory: IDataMethodValue;
|
||||
FFactory: TDataMethodValue;
|
||||
class constructor CreateClass;
|
||||
public
|
||||
type
|
||||
@@ -114,7 +114,7 @@ type
|
||||
class function CreateFactory: TIndicatorFactoryProc<TParams, TArgs, TResult>; static;
|
||||
class function CreateHMA(Period: Integer): TConvertFunc<Double, Double>; static;
|
||||
// Provides the factory method for this indicator as a data value.
|
||||
class property Factory: IDataMethodValue read FFactory;
|
||||
class property Factory: TDataMethodValue read FFactory;
|
||||
end;
|
||||
|
||||
[IndicatorName('RSI', 'Relative Strength Index')]
|
||||
@@ -122,7 +122,7 @@ type
|
||||
TRSI = class
|
||||
strict private
|
||||
class var
|
||||
FFactory: IDataMethodValue;
|
||||
FFactory: TDataMethodValue;
|
||||
class constructor CreateClass;
|
||||
public
|
||||
type
|
||||
@@ -139,7 +139,7 @@ type
|
||||
class function CreateFactory: TIndicatorFactoryProc<TParams, TArgs, TResult>; static;
|
||||
class function CreateRSI(Period: Integer): TConvertFunc<Double, Double>; static;
|
||||
// Provides the factory method for this indicator as a data value.
|
||||
class property Factory: IDataMethodValue read FFactory;
|
||||
class property Factory: TDataMethodValue read FFactory;
|
||||
end;
|
||||
|
||||
[IndicatorName('MACD', 'Moving Average Convergence Divergence')]
|
||||
@@ -147,7 +147,7 @@ type
|
||||
TMACD = class
|
||||
strict private
|
||||
class var
|
||||
FFactory: IDataMethodValue;
|
||||
FFactory: TDataMethodValue;
|
||||
class constructor CreateClass;
|
||||
public
|
||||
type
|
||||
@@ -173,7 +173,7 @@ type
|
||||
EmaSignal: TConvertFunc<Double, Double>
|
||||
): TConvertFunc<Double, TMACD.TResult>; overload; static;
|
||||
// Provides the factory method for this indicator as a data value.
|
||||
class property Factory: IDataMethodValue read FFactory;
|
||||
class property Factory: TDataMethodValue read FFactory;
|
||||
end;
|
||||
|
||||
[IndicatorName('Stoch', 'Stochastic Oscillator')]
|
||||
@@ -181,7 +181,7 @@ type
|
||||
TStochastic = class
|
||||
strict private
|
||||
class var
|
||||
FFactory: IDataMethodValue;
|
||||
FFactory: TDataMethodValue;
|
||||
class constructor CreateClass;
|
||||
public
|
||||
type
|
||||
@@ -205,7 +205,7 @@ type
|
||||
const SmaD: TConvertFunc<Double, Double>
|
||||
): TConvertFunc<TOhlcItem, TStochastic.TResult>; overload; static;
|
||||
// Provides the factory method for this indicator as a data value.
|
||||
class property Factory: IDataMethodValue read FFactory;
|
||||
class property Factory: TDataMethodValue read FFactory;
|
||||
end;
|
||||
|
||||
[IndicatorName('StdDev', 'Standard Deviation')]
|
||||
@@ -213,7 +213,7 @@ type
|
||||
TStdDev = class
|
||||
strict private
|
||||
class var
|
||||
FFactory: IDataMethodValue;
|
||||
FFactory: TDataMethodValue;
|
||||
class constructor CreateClass;
|
||||
public
|
||||
type
|
||||
@@ -230,7 +230,7 @@ type
|
||||
class function CreateFactory: TIndicatorFactoryProc<TParams, TArgs, TResult>; static;
|
||||
class function CreateStdDev(Period: Integer): TConvertFunc<Double, Double>; static;
|
||||
// Provides the factory method for this indicator as a data value.
|
||||
class property Factory: IDataMethodValue read FFactory;
|
||||
class property Factory: TDataMethodValue read FFactory;
|
||||
end;
|
||||
|
||||
[IndicatorName('BB', 'Bollinger Bands')]
|
||||
@@ -238,7 +238,7 @@ type
|
||||
TBollingerBands = class
|
||||
strict private
|
||||
class var
|
||||
FFactory: IDataMethodValue;
|
||||
FFactory: TDataMethodValue;
|
||||
class constructor CreateClass;
|
||||
public
|
||||
type
|
||||
@@ -258,7 +258,7 @@ type
|
||||
class function CreateFactory: TIndicatorFactoryProc<TParams, TArgs, TResult>; static;
|
||||
class function CreateBollingerBands(Period: Integer; Multiplier: Double): TConvertFunc<Double, TResult>; static;
|
||||
// Provides the factory method for this indicator as a data value.
|
||||
class property Factory: IDataMethodValue read FFactory;
|
||||
class property Factory: TDataMethodValue read FFactory;
|
||||
end;
|
||||
|
||||
[IndicatorName('ATR', 'Average True Range')]
|
||||
@@ -266,7 +266,7 @@ type
|
||||
TATR = class
|
||||
strict private
|
||||
class var
|
||||
FFactory: IDataMethodValue;
|
||||
FFactory: TDataMethodValue;
|
||||
class constructor CreateClass;
|
||||
public
|
||||
type
|
||||
@@ -284,7 +284,7 @@ type
|
||||
class function CreateATR(Period: Integer): TConvertFunc<TOhlcItem, Double>; overload; static;
|
||||
class function CreateATR(const MovAvgTR: TConvertFunc<Double, Double>): TConvertFunc<TOhlcItem, Double>; overload; static;
|
||||
// Provides the factory method for this indicator as a data value.
|
||||
class property Factory: IDataMethodValue read FFactory;
|
||||
class property Factory: TDataMethodValue read FFactory;
|
||||
end;
|
||||
|
||||
[IndicatorName('KC', 'Keltner Channels')]
|
||||
@@ -292,7 +292,7 @@ type
|
||||
TKeltnerChannels = class
|
||||
strict private
|
||||
class var
|
||||
FFactory: IDataMethodValue;
|
||||
FFactory: TDataMethodValue;
|
||||
class constructor CreateClass;
|
||||
public
|
||||
type
|
||||
@@ -317,7 +317,7 @@ type
|
||||
Multiplier: Double
|
||||
): TConvertFunc<TOhlcItem, TKeltnerChannels.TResult>; overload; static;
|
||||
// Provides the factory method for this indicator as a data value.
|
||||
class property Factory: IDataMethodValue read FFactory;
|
||||
class property Factory: TDataMethodValue read FFactory;
|
||||
end;
|
||||
|
||||
[IndicatorName('Mean', 'Mean Value')]
|
||||
@@ -325,7 +325,7 @@ type
|
||||
TMean = class
|
||||
strict private
|
||||
class var
|
||||
FFactory: IDataMethodValue;
|
||||
FFactory: TDataMethodValue;
|
||||
class constructor CreateClass;
|
||||
public
|
||||
type
|
||||
@@ -341,7 +341,7 @@ type
|
||||
class function CreateFactory: TIndicatorFactoryProc<TParams, TArgs, TResult>; static;
|
||||
class function CreateMean: TConvertFunc<TArray<Double>, Double>; static;
|
||||
// Provides the factory method for this indicator as a data value.
|
||||
class property Factory: IDataMethodValue read FFactory;
|
||||
class property Factory: TDataMethodValue read FFactory;
|
||||
end;
|
||||
|
||||
implementation
|
||||
@@ -350,7 +350,7 @@ implementation
|
||||
|
||||
class constructor TSMA.CreateClass;
|
||||
begin
|
||||
{ var params := TDataType.RecordOf( [TRecordField.Create( 'Period', TDataType.Ordinal )] );
|
||||
{ var params := TDataType.RecordOf( [TRecordField.Create( 'Period', TDataType.Ordinal )] );
|
||||
var args := TDataType.RecordOf( [TRecordField.Create( 'Value', TDataType.Float )] );
|
||||
var results := TDataType.RecordOf( [TRecordField.Create( 'SMA', TDataType.Float )] );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user