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