本文整理汇总了C#中FreeQuant.Series.TimeSeries类的典型用法代码示例。如果您正苦于以下问题:C# TimeSeries类的具体用法?C# TimeSeries怎么用?C# TimeSeries使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TimeSeries类属于FreeQuant.Series命名空间,在下文中一共展示了TimeSeries类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SMA
public SMA(TimeSeries input, int length, BarData option, Color color) : base(input)
{
this.fLength = length;
this.fOption = option;
this.Init();
this.Color = color;
}
示例2: KRI
public KRI(TimeSeries input, int length)
: base(input) {
this.fLength = 14;
this.fLength = length;
this.Init();
}
示例3: Value
public static double Value(TimeSeries input, int index, int length)
{
if (index < length - 1 + input.FirstIndex)
return double.NaN;
double min = input.GetMin(index - length + 1, index, BarData.Low);
return Math.Log(input.GetMax(index - length + 1, index, BarData.High) / min);
}
示例4: EMA
public EMA(TimeSeries input, int length, BarData option) : base(input)
{
this.fLength = 14;
this.fLength = length;
this.fOption = option;
this.Init();
}
示例5: Range
public Range(TimeSeries input, int length, Color color) : base(input)
{
this.length = 14;
this.length = length;
this.Init();
this.fColor = color;
}
示例6: Value
public static double Value(TimeSeries input, int index)
{
if (index >= 1 + input.FirstIndex)
return Math.Max(input[index, BarData.High], input[index - 1, BarData.Close]);
else
return double.NaN;
}
示例7: Value
public static double Value(TimeSeries input, int index, int length)
{
if (index >= length - 1 + input.FirstIndex)
return (input[index, BarData.Volume] - input[index - length + 1, BarData.Volume]) / input[index - length + 1, BarData.Volume] * 100.0;
else
return double.NaN;
}
示例8: Value
public static double Value(TimeSeries input, int index, int length)
{
if (index >= length + input.FirstIndex)
return input.GetMin(index - length, index - 1, BarData.Low);
else
return double.NaN;
}
示例9: PCL
public PCL(TimeSeries input, int length, Color color) : base(input)
{
this.fLength = 14;
this.fLength = length;
this.Init();
this.Color = color;
}
示例10: PERF
public PERF(TimeSeries input, double k, BarData option) : base(input)
{
this.fK = 14.0;
this.fOption = option;
this.fK = k;
this.Init();
}
示例11: Value
public static double Value(TimeSeries input, int index)
{
if (index < 1 + input.FirstIndex)
return double.NaN;
double num1 = input[index, BarData.Close];
double num2 = input[index - 1, BarData.Close];
double num3 = input[index, BarData.Volume];
double num4 = 0.0;
if (index > 1 + input.FirstIndex)
{
if (num1 > num2)
num4 = OBV.Value(input, index - 1) + num3;
if (num1 < num2)
num4 = OBV.Value(input, index - 1) - num3;
if (num1 == num2)
num4 = OBV.Value(input, index - 1);
}
else
{
if (num1 > num2)
num4 = num3;
if (num1 < num2)
num4 = -num3;
if (num1 == num2)
num4 = 0.0;
}
return num4;
}
示例12: PDI
public PDI(TimeSeries input, int length, EIndicatorStyle style) : base(input)
{
this.fLength = 14;
this.fLength = length;
this.fStyle = style;
this.Init();
}
示例13: RSI
public RSI(TimeSeries input, int length, BarData option, EIndicatorStyle style)
: base(input){
this.fLength = 14;
this.fLength = length;
this.fOption = option;
this.fStyle = style;
this.Init();
}
示例14: VCH
public VCH(TimeSeries input, int length1, int length2):base(input)
{
this.fLength1 = 14;
this.fLength2 = 10;
this.fLength1 = length1;
this.fLength2 = length2;
this.Init();
}
示例15: D_Fast
public D_Fast(TimeSeries input, int length, int order) : base(input)
{
this.fLength = 14;
this.fOrder = 10;
this.fLength = length;
this.fOrder = order;
this.Init();
}