public SMA(TimeSeries input, int length, BarData option, Color color) : base(input) { this.fLength = length; this.fOption = option; this.Init(); this.Color = color; }
public KRI(TimeSeries input, int length) : base(input) { this.fLength = 14; this.fLength = length; this.Init(); }
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); }
public PCL(TimeSeries input, int length, Color color) : base(input) { this.fLength = 14; this.fLength = length; this.Init(); this.Color = color; }
public PERF(TimeSeries input, double k, BarData option) : base(input) { this.fK = 14.0; this.fOption = option; this.fK = k; this.Init(); }
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; }
public Range(TimeSeries input, int length, Color color) : base(input) { this.length = 14; this.length = length; this.Init(); this.fColor = color; }
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; }
public PDI(TimeSeries input, int length, EIndicatorStyle style) : base(input) { this.fLength = 14; this.fLength = length; this.fStyle = style; this.Init(); }
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; }
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; }
public EMA(TimeSeries input, int length, BarData option) : base(input) { this.fLength = 14; this.fLength = length; this.fOption = option; this.Init(); }
public PCL(TimeSeries input, int length, Color color, EDrawStyle drawStyle) : base(input) { this.fLength = 14; this.fLength = length; this.Init(); this.Color = color; this.DrawStyle = drawStyle; }
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(); }
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(); }
public Range(TimeSeries input, int length, Color color, EDrawStyle drawStyle) : base(input) { this.length = 14; this.length = length; this.Init(); this.fColor = color; this.fDrawStyle = drawStyle; }
public ADXR(TimeSeries input, int length, EIndicatorStyle style, Color color) : base(input) { this.fLength = 14; this.fLength = length; this.fStyle = style; this.Init(); this.Color = color; }
public PERF(TimeSeries input, double k, BarData option, Color color) : base(input) { this.fK = 14.0; this.fOption = option; this.fK = k; this.Init(); this.Color = color; }
public VCH(TimeSeries input, int length1, int length2):base(input) { this.fLength1 = 14; this.fLength2 = 10; this.fLength1 = length1; this.fLength2 = length2; this.Init(); }
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); }
public VCH(TimeSeries input, int length1, int length2, Color color): base(input) { this.fLength1 = 14; this.fLength2 = 10; this.fLength1 = length1; this.fLength2 = length2; this.Init(); this.Color = color; }
public ENVL(TimeSeries input, int length, double shift, BarData option) : base(input) { this.fLength = 14; this.fShift = 20.0; this.fLength = length; this.fShift = shift; this.fOption = option; this.Init(); }
public EMA(TimeSeries input, int length, BarData option, Color color, EDrawStyle drawStyle) : base(input) { this.fLength = 14; this.fLength = length; this.fOption = option; this.Init(); this.Color = color; this.DrawStyle = drawStyle; }
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]; return index < 2 + input.FirstIndex ? (num1 - num2) / num2 * num3 : (num1 - num2) / num2 * num3 + PVT.Value(input, index - 1); }
public static double Value(TimeSeries input, int index) { if (index < input.FirstIndex + 1) return double.NaN; double num1 = input[index, BarData.High]; double num2 = input[index, BarData.Low]; double num3 = input[index - 1, BarData.Close]; return Math.Max(Math.Abs(num1 - num2), Math.Max(Math.Abs(num1 - num3), Math.Abs(num3 - num2))); }
public PERF(TimeSeries input, double k, BarData option, Color color, EDrawStyle drawStyle) : base(input) { this.fK = 14.0; this.fOption = option; this.fK = k; this.Init(); this.Color = color; this.DrawStyle = drawStyle; }
public PDI(TimeSeries input, int length, EIndicatorStyle style, Color color, EDrawStyle drawStyle) : base(input) { this.fLength = 14; this.fLength = length; this.fStyle = style; this.Init(); this.Color = color; this.DrawStyle = drawStyle; }
public static double Value(TimeSeries input, int index) { if (index < input.FirstIndex) return double.NaN; double num1 = input[index, BarData.High]; double num2 = input[index, BarData.Low]; double num3 = input[index, BarData.Volume]; return num3 == 0.0 ? 0.0 : (num1 - num2) / num3 * 1000.0; }
public MACD(TimeSeries input, int length1, int length2, BarData option) : base(input) { this.fLength1 = 14; this.fLength2 = 10; this.fLength1 = length1; this.fLength2 = length2; this.fOption = option; this.Init(); }
public BBU(TimeSeries input, int length, double k, BarData option) : base(input) { this.fLength = 14; this.fK = 3.0; this.fLength = length; this.fOption = option; this.fK = k; this.Init(); }
///<summary> /// Initializes a new instance of the UserIndicator class ///</summary> public UserIndicator(ISeries input) { this.input = input; if (input is TimeSeries) { this.series = (FreeQuant.Series.TimeSeries)(input as TimeSeries).series; } if (input is BarSeries) { this.series = (FreeQuant.Series.TimeSeries)(input as BarSeries).series; } if (input is Indicator) { this.series = (FreeQuant.Series.TimeSeries)(input as Indicator).indicator; } this.indicator = new FreeQuant.Indicators.Indicator(this.series); }
public SeriesEventArgs(TimeSeries series) : base() { this.Series = series; }
public virtual double GetCovariance(TimeSeries series) { throw new NotSupportedException(); }
public ECross Crosses(TimeSeries series, Bar bar, BarData barData) { return(this.Crosses(series, bar.DateTime, barData)); }
public override double GetCovariance(TimeSeries series) { return(this.GetCovariance(series, this.FirstDateTime, this.LastDateTime)); }
public bool CrossesAbove(TimeSeries series, Bar bar) { return(this.Crosses(series, bar.DateTime) == ECross.Above); }
public bool CrossesAbove(TimeSeries series, DateTime dateTime) { return(this.Crosses(series, dateTime) == ECross.Above); }
public bool CrossesBelow(TimeSeries series, Bar bar) { return(this.Crosses(series, bar.DateTime) == ECross.Below); }
public bool CrossesBelow(TimeSeries series, DateTime dateTime) { return(this.Crosses(series, dateTime) == ECross.Below); }
public ECross Crosses(TimeSeries series, Bar bar) { return(this.Crosses(series, bar.DateTime)); }
public ECross Crosses(TimeSeries series, DateTime dateTime, BarData barData) { return(this.Crosses(series, dateTime, (int)barData)); }
public virtual double GetCorrelation(TimeSeries series, DateTime datetime1, DateTime datetime2) { throw new NotSupportedException(); }
public virtual double GetCorrelation(TimeSeries series) { throw new NotSupportedException(); }
public ECross Crosses(TimeSeries series, Bar bar, int row) { return(this.Crosses(series, bar.DateTime, row)); }