コード例 #1
0
ファイル: SMA.cs プロジェクト: heber/FreeOQ
		public SMA(TimeSeries input, int length, BarData option, Color color) : base(input)
		{
			this.fLength = length;
			this.fOption = option;
			this.Init();
			this.Color = color;
		}
コード例 #2
0
ファイル: KRI.cs プロジェクト: heber/FreeOQ
    public KRI(TimeSeries input, int length)
			: base(input)  {
      this.fLength = 14;

      this.fLength = length;
      this.Init();
    }
コード例 #3
0
ファイル: Range.cs プロジェクト: heber/FreeOQ
 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
0
ファイル: PCL.cs プロジェクト: heber/FreeOQ
		public PCL(TimeSeries input, int length, Color color)	: base(input) 
    {
      this.fLength = 14;
      this.fLength = length;
      this.Init();
      this.Color = color;
    }
コード例 #5
0
ファイル: PERF.cs プロジェクト: heber/FreeOQ
		public PERF(TimeSeries input, double k, BarData option)	: base(input) 
    {
      this.fK = 14.0;
      this.fOption = option;
      this.fK = k;
      this.Init();
    }
コード例 #6
0
ファイル: PCL.cs プロジェクト: heber/FreeOQ
 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;
 }
コード例 #7
0
ファイル: Range.cs プロジェクト: heber/FreeOQ
		public Range(TimeSeries input, int length, Color color)	: base(input) 
    {
      this.length = 14;
      this.length = length;
      this.Init();
			this.fColor = color;
    }
コード例 #8
0
ファイル: TH.cs プロジェクト: heber/FreeOQ
 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;
 }
コード例 #9
0
ファイル: PDI.cs プロジェクト: heber/FreeOQ
		public PDI(TimeSeries input, int length, EIndicatorStyle style)	: base(input) 
    {
      this.fLength = 14;
      this.fLength = length;
      this.fStyle = style;
      this.Init();
    }
コード例 #10
0
ファイル: OBV.cs プロジェクト: heber/FreeOQ
 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;
 }
コード例 #11
0
ファイル: VROC.cs プロジェクト: heber/FreeOQ
 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;
 }
コード例 #12
0
ファイル: EMA.cs プロジェクト: heber/FreeOQ
		public EMA(TimeSeries input, int length, BarData option)	: base(input) 
    {
      this.fLength = 14;
      this.fLength = length;
      this.fOption = option;
      this.Init();
    }
コード例 #13
0
ファイル: PCL.cs プロジェクト: heber/FreeOQ
		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;
    }
コード例 #14
0
ファイル: RSI.cs プロジェクト: heber/FreeOQ
    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();
    }
コード例 #15
0
ファイル: D_Fast.cs プロジェクト: heber/FreeOQ
		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();
    }
コード例 #16
0
ファイル: Range.cs プロジェクト: heber/FreeOQ
    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;
    }
コード例 #17
0
ファイル: ADXR.cs プロジェクト: heber/FreeOQ
		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;
    }
コード例 #18
0
ファイル: PERF.cs プロジェクト: heber/FreeOQ
		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;
    }
コード例 #19
0
ファイル: VCH.cs プロジェクト: heber/FreeOQ
		public VCH(TimeSeries input, int length1, int length2):base(input)
    {
      this.fLength1 = 14;
      this.fLength2 = 10;
      this.fLength1 = length1;
      this.fLength2 = length2;
      this.Init();
    }
コード例 #20
0
ファイル: R.cs プロジェクト: heber/FreeOQ
 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);
 }
コード例 #21
0
ファイル: VCH.cs プロジェクト: heber/FreeOQ
		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;
    }
コード例 #22
0
ファイル: ENVL.cs プロジェクト: heber/FreeOQ
		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();
    }
コード例 #23
0
ファイル: EMA.cs プロジェクト: heber/FreeOQ
    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;
    }
コード例 #24
0
ファイル: PVT.cs プロジェクト: heber/FreeOQ
 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);
 }
コード例 #25
0
ファイル: TR.cs プロジェクト: heber/FreeOQ
 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)));
 }
コード例 #26
0
ファイル: PERF.cs プロジェクト: heber/FreeOQ
    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;
    }
コード例 #27
0
ファイル: PDI.cs プロジェクト: heber/FreeOQ
    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;
    }
コード例 #28
0
ファイル: MarketFI.cs プロジェクト: heber/FreeOQ
 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;
 }
コード例 #29
0
ファイル: MACD.cs プロジェクト: heber/FreeOQ
    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();
    }
コード例 #30
0
ファイル: BBU.cs プロジェクト: heber/FreeOQ
    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();
    }
コード例 #31
0
ファイル: UserIndicator.cs プロジェクト: zhuzhenping/FreeOQ
 ///<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);
 }
コード例 #32
0
 public SeriesEventArgs(TimeSeries series) : base()
 {
     this.Series = series;
 }
コード例 #33
0
 public virtual double GetCovariance(TimeSeries series)
 {
     throw new NotSupportedException();
 }
コード例 #34
0
 public ECross Crosses(TimeSeries series, Bar bar, BarData barData)
 {
     return(this.Crosses(series, bar.DateTime, barData));
 }
コード例 #35
0
ファイル: DoubleSeries.cs プロジェクト: zhuzhenping/FreeOQ
 public override double GetCovariance(TimeSeries series)
 {
     return(this.GetCovariance(series, this.FirstDateTime, this.LastDateTime));
 }
コード例 #36
0
 public bool CrossesAbove(TimeSeries series, Bar bar)
 {
     return(this.Crosses(series, bar.DateTime) == ECross.Above);
 }
コード例 #37
0
 public bool CrossesAbove(TimeSeries series, DateTime dateTime)
 {
     return(this.Crosses(series, dateTime) == ECross.Above);
 }
コード例 #38
0
 public bool CrossesBelow(TimeSeries series, Bar bar)
 {
     return(this.Crosses(series, bar.DateTime) == ECross.Below);
 }
コード例 #39
0
 public bool CrossesBelow(TimeSeries series, DateTime dateTime)
 {
     return(this.Crosses(series, dateTime) == ECross.Below);
 }
コード例 #40
0
 public ECross Crosses(TimeSeries series, Bar bar)
 {
     return(this.Crosses(series, bar.DateTime));
 }
コード例 #41
0
 public ECross Crosses(TimeSeries series, DateTime dateTime, BarData barData)
 {
     return(this.Crosses(series, dateTime, (int)barData));
 }
コード例 #42
0
 public virtual double GetCorrelation(TimeSeries series, DateTime datetime1, DateTime datetime2)
 {
     throw new NotSupportedException();
 }
コード例 #43
0
 public virtual double GetCorrelation(TimeSeries series)
 {
     throw new NotSupportedException();
 }
コード例 #44
0
 public ECross Crosses(TimeSeries series, Bar bar, int row)
 {
     return(this.Crosses(series, bar.DateTime, row));
 }