public override TIOutput GetCurrentValue(List <TradeBucket> buckets) { BucketsToBars(buckets); TIOutput ti = new TIOutput(); ti.Id = this.Id; ti.Time = buckets[buckets.Count - 1].Time; ti.Value = Math.Truncate(WealthLab.Indicators.CumUp.Series(_data.Close, 3)[_data.Count - 1]); return(ti); }
public override TIOutput GetCurrentValue(List <TradeBucket> buckets) { BucketsToBars(buckets); DataSeries roc = WealthLab.Indicators.DPO.Series(_data.Close, 20); TIOutput ti = new TIOutput(); ti.Id = this.Id; ti.Time = buckets[buckets.Count - 1].Time; ti.Value = roc[roc.Count - 1]; return(ti); }
public override TIOutput GetCurrentValue(List <TradeBucket> buckets) { BucketsToBars(buckets); DataSeries stoRSI = WealthLab.Indicators.StochRSI.Series(_data.Close, 14); TIOutput ti = new TIOutput(); ti.Id = this.Id; ti.Time = buckets[buckets.Count - 1].Time; ti.Value = stoRSI[stoRSI.Count - 1]; return(ti); }
public override TIOutput GetCurrentValue(List <TradeBucket> buckets) { BucketsToBars(buckets); DataSeries avg = WealthLab.Indicators.AveragePrice.Series(_data); TIOutput ti = new TIOutput(); ti.Id = this.Id; ti.Time = buckets[buckets.Count - 1].Time; ti.Value = avg[avg.Count - 1]; return(ti); }
public override TIOutput GetCurrentValue(List <TradeBucket> buckets) { BucketsToBars(buckets); DataSeries PctR = WealthLab.Indicators.WilliamsR.Series(_data, 14); DataSeries SmoothR = WealthLab.Indicators.WilderMA.Series(PctR, 4); TIOutput ti = new TIOutput(); ti.Id = this.Id; ti.Time = buckets[buckets.Count - 1].Time; ti.Value = SmoothR[SmoothR.Count - 1]; return(ti); }
public override TIOutput GetCurrentValue(List <TradeBucket> buckets) { BucketsToBars(buckets); DataSeries roc = WealthLab.Indicators.MFI.Series(_data, 14); TIOutput ti = new TIOutput(); ti.Id = this.Id; ti.Time = buckets[buckets.Count - 1].Time; ti.Value = roc[roc.Count - 1]; if (double.IsNaN(ti.Value)) { ti.Value = 0; } decimal val = (decimal)ti.Value; return(ti); }