Example #1
0
File: TR.cs Project: heber/FreeOQ
 public override void OnInputItemAdded(object sender, DateTimeEventArgs EventArgs)
 {
   if (!this.Monitored)
     return;
   int index = this.fInput.GetIndex(EventArgs.DateTime);
   if (index == -1)
     return;
   for (int Index = index; Index <= Math.Min(this.fInput.Count - 1, index + 1); ++Index)
     this.Calculate(Index);
 }
Example #2
0
		private void HandleSeriesItemAdded(object sender, DateTimeEventArgs e)
		{
			bool flag = false;
			lock (this.dataLock)
			{
				this.contentUpdated = true;
				if (this.firstIndex == -1)
					this.firstIndex = 0;
				switch (this.updateStyle)
				{
					case ChartUpdateStyle.WholeRange:
						this.SetPadIntervals(0, this.mainSeries.Count - 1);
						flag = true;
						break;
					case ChartUpdateStyle.Trailing:
						if (this.lastIndex - this.firstIndex + 1 < this.minCountOfBars)
							this.SetPadIntervals(this.firstIndex, this.lastIndex + 1);
						else
							this.SetPadIntervals(this.firstIndex + 1, this.lastIndex + 1);
						flag = true;
						break;
				}
			}
			if (flag)
				this.Invalidate();
			Application.DoEvents();
		}
Example #3
0
File: VCH.cs Project: heber/FreeOQ
 protected override void OnInputItemAdded2(object sender, DateTimeEventArgs EventArgs)
 {
   int index = this.fInput.GetIndex(EventArgs.DateTime);
   if (index != -1)
     this.fHL_array.Add(this.fInput.GetDateTime(index), this.fInput[index, BarData.High] - this.fInput[index, BarData.Low]);
   base.OnInputItemAdded2(sender, EventArgs);
 }
Example #4
0
File: RSI.cs Project: heber/FreeOQ
 public override void OnInputItemAdded(object sender, DateTimeEventArgs EventArgs)
 {
   if (!this.Monitored)
     return;
   int index = this.fInput.GetIndex(EventArgs.DateTime);
   if (index == -1)
     return;
   if (this.fStyle == EIndicatorStyle.QuantStudio)
   {
     for (int Index = index; Index <= Math.Min(this.fInput.Count - 1, index + this.fLength); ++Index)
       this.Calculate(Index);
   }
   else
   {
     for (int Index = index; Index <= this.fInput.Count - 1; ++Index)
       this.Calculate(Index);
   }
 }
Example #5
0
		private void OnInputItemAdded(object sender, DateTimeEventArgs args)
		{
			double num = this.Calculate(this.series.GetIndex(args.DateTime));
			if (double.IsNaN(num))
				return;
			((DoubleSeries)this.indicator).Add(args.DateTime, num);
		}
Example #6
0
File: EMA.cs Project: heber/FreeOQ
 public override void OnInputItemAdded(object sender, DateTimeEventArgs EventArgs)
 {
   int index = this.fInput.GetIndex(EventArgs.DateTime);
   if (index == -1)
     return;
   for (int Index = index; Index <= this.fInput.Count - 1; ++Index)
     this.Calculate(Index);
 }
Example #7
0
File: SAR.cs Project: heber/FreeOQ
 public override void OnInputItemAdded(object sender, DateTimeEventArgs EventArgs)
 {
   if (!this.Monitored)
     return;
   int index = this.fInput.GetIndex(EventArgs.DateTime);
   if (index == -1)
     return;
   if (index == this.fInput.Count - 1)
   {
     this.Calculate(index);
   }
   else
   {
     this.rDfv3IEXe();
     this.Clear();
     for (int Index = 0; Index <= this.fInput.Count - 1; ++Index)
       this.Calculate(Index);
   }
 }
Example #8
0
		private void oq2A1bOgQG(object obj0, DateTimeEventArgs obj1)
		{
			DateTime index = obj1.DateTime;
			switch (this.k5kAXvwmyK)
			{
				case TriggerType.Above:
					if (this.fISADbUH9Z[index] <= this.J3YAFHAWt0)
						break;
					this.rKEA9ZLnkT();
					this.eiNALoFbZL = new Signal(Clock.Now, this.eiNALoFbZL.Sender, this.eiNALoFbZL.Type, this.eiNALoFbZL.Side, this.eiNALoFbZL.Qty, this.eiNALoFbZL.Price, this.eiNALoFbZL.Instrument, this.eiNALoFbZL.Text);
					this.nquAKcUOSY.BgvpSPpUAD(this.eiNALoFbZL);
					this.KWCAC961IE(TriggerStatus.Executed);
					break;
				case TriggerType.Below:
					if (this.fISADbUH9Z[index] >= this.J3YAFHAWt0)
						break;
					this.rKEA9ZLnkT();
					this.eiNALoFbZL = new Signal(Clock.Now, this.eiNALoFbZL.Sender, this.eiNALoFbZL.Type, this.eiNALoFbZL.Side, this.eiNALoFbZL.Qty, this.eiNALoFbZL.Price, this.eiNALoFbZL.Instrument, this.eiNALoFbZL.Text);
					this.nquAKcUOSY.BgvpSPpUAD(this.eiNALoFbZL);
					this.KWCAC961IE(TriggerStatus.Executed);
					break;
			}
		}
Example #9
0
File: MASS.cs Project: heber/FreeOQ
 public override void OnInputItemAdded(object sender, DateTimeEventArgs EventArgs)
 {
   int index = this.fInput.GetIndex(EventArgs.DateTime);
   if (index == -1)
     return;
   this.fHL_array.Add(this.fInput.GetDateTime(index), this.fInput[index, BarData.High] - this.fInput[index, BarData.Low]);
   if (!this.Monitored)
     return;
   for (int Index = index; Index <= this.fInput.Count - 1; ++Index)
     this.Calculate(Index);
 }
Example #10
0
		public virtual void OnInputItemAdded(object sender, DateTimeEventArgs e)
		{
			if (!this.fMonitored) return;

			int index = this.fInput.GetIndex(e.DateTime);
			if (index == -1) return;

			this.Calculate(index);
		}
Example #11
0
		protected virtual void OnInputItemAdded2(object sender, DateTimeEventArgs e)
		{
			if (this.inputCalculate) return;
			if (this.fCalculate)
				this.Calculate();
			this.OnInputItemAdded(sender, e);
		}