protected override string GetPresentDetail(IOutputInstant Instant, IIndicatorValues Data, IndicatorParameters IndicatorParameters) { Volatility vol = Data.Volatility(IndicatorParameters)[Instant.ExposureDate]; if (vol != null) { return(String.Format("{0}|", vol.Value)); } else { return(String.Format("{0}|", "")); } }
protected override String GetPresentDetail(IOutputInstant Instant, IIndicatorValues Data, IndicatorParameters IndicatorParameters) { KeltnerChannel keltner = Data.KeltnerChannel(IndicatorParameters)[Instant.ExposureDate]; if (keltner != null) { return(String.Format("{0}|{1}|{2}|{3}|{4}|", keltner.Lower, keltner.Mid, keltner.Upper, (int)keltner.Oscillation, keltner.Oscillation)); } else { return(String.Format("{0}|{1}|{2}|{3}|{4}|", "", "", "", "", "")); } }
protected override string GetPresentDetail(IOutputInstant Instant, IIndicatorValues Data, IndicatorParameters IndicatorParameters) { SMAPair sma = Data.SMAPair(IndicatorParameters)[Instant.ExposureDate]; if (sma != null) { return(String.Format("{0}|{1}|{2}|{3}|", sma.Fast, sma.Slow, (int)sma.Direction, sma.Direction)); } else { return(String.Format("{0}|{1}|{2}|{3}|", "", "", "", "")); } }
protected override string GetPresentDetail(IOutputInstant Instant, IIndicatorValues Data, IndicatorParameters IndicatorParameters) { Trends trends = Data.Trends(IndicatorParameters)[Instant.ExposureDate]; if (trends != null) { return(String.Format("{0}|{1}|", (int)trends.Direction, trends.Direction)); } else { return(String.Format("{0}|{1}|", "", "")); } }
protected override string GetPresentDetail(IOutputInstant Instant, IIndicatorValues Data, IndicatorParameters IndicatorParameters) { ATR atr = Data.ATR(IndicatorParameters)[Instant.ExposureDate]; if (atr != null) { return(String.Format("{0}|", atr.Value)); } else { return(String.Format("{0}|", "")); } }
protected override string GetPresentDetail(IOutputInstant Instant, IIndicatorValues Data, IndicatorParameters IndicatorParameters) { int fastPeriod = (int)IndicatorParameters.List[0]; int slowPeriod = (int)IndicatorParameters.List[1]; EMAPair emaPair = Data.EmaPair(fastPeriod, slowPeriod)[Instant.ExposureDate]; return(String.Format("{0}|{1}|{2}|{3}|", (emaPair == null) ? "" : Convert.ToString(emaPair.Fast), (emaPair == null) ? "" : Convert.ToString(emaPair.Slow), (int)emaPair.Direction, emaPair.Direction)); }
protected override string GetPresentDetail(IOutputInstant Instant, IIndicatorValues Data, IndicatorParameters IndicatorParameters) { MomentumRelative momRelative = Data.MomentumRelative(IndicatorParameters)[Instant.ExposureDate]; if (momRelative != null) { return(String.Format("{0}|{1}|{2}|", momRelative.Value, (int)momRelative.Direction, momRelative.Direction)); } else { return(String.Format("{0}|{1}|{2}|", "", "", "")); } }
protected override string GetPresentDetail(IOutputInstant Instant, IIndicatorValues Data, IndicatorParameters IndicatorParameters) { StandardDeviation sd = Data.SD(IndicatorParameters)[Instant.ExposureDate]; if (sd != null) { return(String.Format("{0}|", sd.Value)); } else { return(String.Format("{0}|", "")); } }
protected override string GetPresentDetail(IOutputInstant Instant, IIndicatorValues Data, IndicatorParameters IndicatorParameters) { Stochastic stochastic = Data.SlowStochastic(IndicatorParameters)[Instant.ExposureDate]; if (stochastic != null) { return(String.Format("{0}|{1}|{2}|{3}|", stochastic.PercentageK, stochastic.PercentageD, (int)stochastic.Oscillation, stochastic.Oscillation)); } else { return(String.Format("{0}|{1}|{2}|{3}|", "", "", "", "")); } }
protected override String GetPresentDetail(IOutputInstant Instant, IIndicatorValues Data, IndicatorParameters IndicatorParameters) { VPFEChannel channel = Data.VPFEChannel(IndicatorParameters)[Instant.ExposureDate]; if (channel != null) { return(String.Format("{0}|{1}|{2}|{3}|{4}|", channel.Lower, channel.Mid, channel.Upper, (int)channel.Oscillation, channel.Oscillation)); } else { return(String.Format("{0}|{1}|{2}|{3}|{4}|", "", "", "", "", "")); } }
protected override string GetPresentDetail(IOutputInstant Instant, IIndicatorValues Data, IndicatorParameters IndicatorParameters) { Complexity fc = Data.Complexity(IndicatorParameters)[Instant.ExposureDate]; if (fc != null) { return(String.Format("{0}|", fc.FractalComplexity)); } else { return(String.Format("{0}|", "")); } }
protected override string GetPresentDetail(IOutputInstant Instant, IIndicatorValues Data, IndicatorParameters IndicatorParameters) { RSI rsi = Data.RSI(IndicatorParameters)[Instant.ExposureDate]; if (rsi != null) { return(String.Format("{0}|{1}|{2}|", rsi.Value, (int)rsi.Oscillation, rsi.Oscillation)); } else { return(String.Format("{0}|{1}|{2}|", "", "", "")); } }
protected override String GetPresentDetail(IOutputInstant Instant, IIndicatorValues Data, IndicatorParameters IndicatorParameters) { Chop choppiness = Data.Chop(IndicatorParameters)[Instant.ExposureDate]; if (choppiness != null) { return(String.Format("{0}|{1}|{2}|", choppiness.Value, (int)choppiness.Trendiness, choppiness.Trendiness)); } else { return(String.Format("{0}|{1}|{2}", "", "", "")); } }
protected override string GetPresentDetail(IOutputInstant Instant, IIndicatorValues Data, IndicatorParameters IndicatorParameters) { PFE pfe = Data.PFE(IndicatorParameters)[Instant.ExposureDate]; if (pfe != null) { return(String.Format("{0}|{1}|{2}|{3}|{4}|{5}|{6}|", pfe.Value, (int)pfe.Trendiness, pfe.Trendiness, (int)pfe.Direction, pfe.Direction, (int)pfe.Oscillation, pfe.Oscillation)); } else { return(String.Format("{0}|{1}|{2}|{3}|{4}|{5}|{6}|", "", "", "", "", "", "", "")); } }
protected override String GetAbsentDetail(IOutputInstant Instant, IIndicatorValues Data, IndicatorParameters IndicatorParameters) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < NUM_LEVELS_ABOVEANDBELOW; i++) { sb.AppendFormat("{0}|{1}|{2}|", "", "", ""); } sb.AppendFormat("{0}|{1}|{2}|{3}|", "", "", "", ""); return(sb.ToString()); }
protected override string GetPresentDetail(IOutputInstant Instant, IIndicatorValues Data, IndicatorParameters IndicatorParameters) { CCI cci = Data.CCI(IndicatorParameters)[Instant.ExposureDate]; if (cci != null) { return(String.Format("{0}|{1}|{2}|{3}|{4}|{5}|{6}|", cci.Value, (int)cci.Trendiness, cci.Trendiness, (int)cci.Direction, cci.Direction, (int)cci.Oscillation, cci.Oscillation)); } else { return(String.Format("{0}|{1}|{2}|{3}|{4}|{5}|{6}|", "", "", "", "", "", "", "")); } }
protected override string GetPresentDetail(IOutputInstant Instant, IIndicatorValues Data, IndicatorParameters IndicatorParameters) { ADX adx = Data.ADXSimple(IndicatorParameters)[Instant.ExposureDate]; if (adx != null) { return(String.Format("{0}|{1}|{2}|{3}|{4}|", adx.MinusDI, adx.PlusDI, adx.ADXValue, (int)adx.Trendiness, adx.Trendiness)); } else { return(String.Format("{0}|{1}|{2}|{3}|{4}|", "", "", "", "", "")); } }
protected override string GetPresentDetail(IOutputInstant Instant, IIndicatorValues Data, IndicatorParameters IndicatorParameters) { MESA mesa = Data.MESA(IndicatorParameters)[Instant.ExposureDate]; if (mesa != null) { return(String.Format("{0}|{1}|{2}|{3}|{4}|", mesa.Period, mesa.SmoothPeriod, mesa.Detrender, mesa.Phase, mesa.DeltaPhase)); } else { return(String.Format("{0}|{1}|{2}|{3}|{4}|", "", "", "", "", "")); } }
protected override string GetPresentDetail(IOutputInstant Instant, IIndicatorValues Data, IndicatorParameters IndicatorParameters) { ADXRelative adx = Data.ADXExponentialRelative(IndicatorParameters)[Instant.ExposureDate]; if (adx != null) { return(String.Format("{0}|{1}|{2}|", adx.Value, (int)adx.Trendiness, adx.Trendiness)); } else { return(String.Format("{0}|{1}|{2}|", "", "", "")); } }
protected override string GetPresentDetail(IOutputInstant Instant, IIndicatorValues Data, IndicatorParameters IndicatorParameters) { MamaFama mama = Data.MamaFama(IndicatorParameters)[Instant.ExposureDate]; if (mama != null) { return(String.Format("{0}|{1}|{2}|{3}|{4}|", mama.MAMA, mama.FAMA, mama.Alpha, (int)mama.Direction, mama.Direction)); } else { return(String.Format("{0}|{1}|{2}|{3}|{4}|", "", "", "", "", "")); } }
protected override string GetPresentDetail(IOutputInstant Instant, IIndicatorValues Data, IndicatorParameters IndicatorParameters) { Divergence divergence = Data.Divergence(IndicatorParameters)[Instant.ExposureDate]; string upValue = Convert.ToString((Data as IIndicatorValues).Bar[Instant.ExposureDate].Close * 0.99M); string downValue = Convert.ToString((Data as IIndicatorValues).Bar[Instant.ExposureDate].Close * 1.01M); return(String.Format("{0}|{1}|{2}|{3}|{4}|{5}|{6}|{7}|", divergence.StudyPeakToPeakValue, divergence.StudyDipToDipValue, divergence.DivergencePeakToPeakValue, divergence.DivergenceDipToDipValue, (divergence.IsUp) ? upValue : "", (divergence.IsDown) ? downValue : "", (int)divergence.Direction, divergence.Direction)); }
public string GetDetail(IOutputInstant Instant, params IIndicatorValues[] Data) { StringBuilder sb = new StringBuilder(); foreach (IIndicatorValues item in Data) { if (this.Instants.Contains(Instant)) { string presentData; if (this.IndicatorParameters != null) { presentData = GetPresentDetail(Instant, item, this.IndicatorParameters); } else { presentData = GetPresentDetail(Instant, item); } if (presentData != null) { sb.Append(presentData); } } else { string absentData; if (this.IndicatorParameters != null) { absentData = GetAbsentDetail(Instant, item); } else { absentData = GetAbsentDetail(Instant, item, this.IndicatorParameters); } if (absentData != null) { sb.Append(absentData); } } } return(sb.ToString()); }
protected override String GetAbsentDetail(IOutputInstant Instant, IIndicatorValues Data, IndicatorParameters IndicatorParameters) { return(String.Format("{0}|", "")); }
protected virtual string GetAbsentDetail(IOutputInstant Instant, IIndicatorValues Data) { return(GetAbsentDetail(Instant, Data, this.IndicatorParameters)); }
protected override String GetPresentDetail(IOutputInstant Instant, IIndicatorValues Data, IndicatorParameters IndicatorParameters) { StringBuilder sb = new StringBuilder(); int index = 0; foreach (IBarrierValue barrier in this.GetLines(Instant.ExposureDate, (Data as IIndicatorValues)).GetClosestBarrierAbove( GetStudyValue(Instant.ExposureDate, (Data as IIndicatorValues)), (Data as IIndicatorValues).Bar[Instant.ExposureDate].Number, false, TrendType.NotSet, false, CongestionBoundary.NotSet, 0)) { decimal value = barrier.GetValueAt((Data as IIndicatorValues).Bar.CurrentBar); if (index < NUM_LEVELS_ABOVEANDBELOW) { sb.AppendFormat("{0}|{1}|{2}|", value, value - (barrier as IAggregateLine).ProximateDistance, (barrier as IAggregateLine).NumTests); } else { break; } index++; } while (index < NUM_LEVELS_ABOVEANDBELOW) { sb.AppendFormat("{0}|{1}|{2}|", "", "", ""); index++; } index = 0; foreach (IBarrierValue barrier in this.GetLines(Instant.ExposureDate, (Data as IIndicatorValues)).GetClosestBarrierBelow( GetStudyValue(Instant.ExposureDate, (Data as IIndicatorValues)), (Data as IIndicatorValues).Bar[Instant.ExposureDate].Number, false, TrendType.NotSet, false, CongestionBoundary.NotSet, 0)) { decimal value = barrier.GetValueAt((Data as IIndicatorValues).Bar.CurrentBar); if (index < NUM_LEVELS_ABOVEANDBELOW) { sb.AppendFormat("{0}|{1}|{2}|", value, value + (barrier as IAggregateLine).ProximateDistance, (barrier as IAggregateLine).NumTests); } else { break; } index++; } while (index < NUM_LEVELS_ABOVEANDBELOW) { sb.AppendFormat("{0}|{1}|{2}|", "", "", ""); index++; } index = 0; foreach (IBarrierValue barrier in this.GetLines(Instant.ExposureDate, (Data as IIndicatorValues)).GetClosestBarrierAbove( GetStudyValue(Instant.ExposureDate, (Data as IIndicatorValues)), (Data as IIndicatorValues).Bar[Instant.ExposureDate].Number, false, TrendType.NotSet, true, CongestionBoundary.Upper, 0)) { decimal value = barrier.GetValueAt((Data as IIndicatorValues).Bar.CurrentBar); if (index < 1) { sb.AppendFormat("{0}|", value); } else { break; } index++; } while (index < 1) { sb.AppendFormat("{0}|", ""); index++; } index = 0; foreach (IBarrierValue barrier in this.GetLines(Instant.ExposureDate, (Data as IIndicatorValues)).GetClosestBarrierAbove( GetStudyValue(Instant.ExposureDate, (Data as IIndicatorValues)), (Data as IIndicatorValues).Bar[Instant.ExposureDate].Number, false, TrendType.NotSet, true, CongestionBoundary.Lower, 0)) { decimal value = barrier.GetValueAt((Data as IIndicatorValues).Bar.CurrentBar); if (index < 1) { sb.AppendFormat("{0}|", value); } else { break; } index++; } while (index < 1) { sb.AppendFormat("{0}|", ""); index++; } index = 0; foreach (IBarrierValue barrier in this.GetLines(Instant.ExposureDate, (Data as IIndicatorValues)).GetClosestBarrierBelow( GetStudyValue(Instant.ExposureDate, (Data as IIndicatorValues)), (Data as IIndicatorValues).Bar[Instant.ExposureDate].Number, false, TrendType.NotSet, true, CongestionBoundary.Upper, 0)) { decimal value = barrier.GetValueAt((Data as IIndicatorValues).Bar.CurrentBar); if (index < 1) { sb.AppendFormat("{0}|", value); } else { break; } index++; } while (index < 1) { sb.AppendFormat("{0}|", ""); index++; } index = 0; foreach (IBarrierValue barrier in this.GetLines(Instant.ExposureDate, (Data as IIndicatorValues)).GetClosestBarrierBelow( GetStudyValue(Instant.ExposureDate, (Data as IIndicatorValues)), (Data as IIndicatorValues).Bar[Instant.ExposureDate].Number, false, TrendType.NotSet, true, CongestionBoundary.Lower, 0)) { decimal value = barrier.GetValueAt((Data as IIndicatorValues).Bar.CurrentBar); if (index < 1) { sb.AppendFormat("{0}|", value); } else { break; } index++; } while (index < 1) { sb.AppendFormat("{0}|", ""); index++; } return(sb.ToString()); }
protected abstract string GetAbsentDetail(IOutputInstant Instant, IIndicatorValues Data, IndicatorParameters IndicatorParameters);
protected override abstract String GetPresentDetail(IOutputInstant Instant, IIndicatorValues Data, IndicatorParameters IndicatorParameters);