本文整理汇总了C#中FreeQuant.Series.TimeSeries.GetMin方法的典型用法代码示例。如果您正苦于以下问题:C# TimeSeries.GetMin方法的具体用法?C# TimeSeries.GetMin怎么用?C# TimeSeries.GetMin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FreeQuant.Series.TimeSeries
的用法示例。
在下文中一共展示了TimeSeries.GetMin方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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;
}
示例2: Value
public static double Value(TimeSeries input, int index, int length, BarData option)
{
if (index < length + input.FirstIndex)
return double.NaN;
double num1 = Math.Abs(input.GetMax(index - length + 1, index, option) - input.GetMin(index - length + 1, index, option));
double num2 = 0.0;
for (int index1 = index; index1 > index - length; --index1)
num2 += Math.Abs(input[index1, option] - input[index1 - 1, option]);
return num1 / num2;
}
示例3: Value
public static double Value(TimeSeries input, int index, int length, int order)
{
if (index < length + order - 1 + input.FirstIndex)
return double.NaN;
double num1 = 0.0;
for (int index2 = index; index2 > index - order; --index2)
{
double min = input.GetMin(index2 - length + 1, index2, BarData.Low);
double max = input.GetMax(index2 - length + 1, index2, BarData.High);
double num2 = input[index2, BarData.Close];
double num3 = max - min;
double num4 = num2 - min;
num1 += 100.0 * num4 / num3;
}
return num1 / (double) order;
}
示例4: Value
public static double Value(TimeSeries input, int index, int length)
{
if (index < length - 1 + input.FirstIndex)
return double.NaN;
double num = input[index, BarData.Close];
double min = input.GetMin(index - length + 1, index, BarData.Low);
double max = input.GetMax(index - length + 1, index, BarData.High);
return -100.0 * (max - num) / (max - min);
}
示例5: 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);
}