using MarketData.MarketDataModel; using MarketData.Numerical; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace MarketData.Generator.Indicators { public class PriceTrendIndicatorResult { public PriceTrendIndicatorResult(bool isUptrend,double highPriceSlope=double.NaN,double lowPriceSlope=double.NaN) { this.IsUpTrend=isUptrend; this.HighPriceSlope=highPriceSlope; this.LowPriceSlope=lowPriceSlope; } public bool IsUpTrend{get;private set;} public double HighPriceSlope{get;private set;} public double LowPriceSlope{get; private set;} } public class PriceTrendIndicator { private PriceTrendIndicator() { } public static PriceTrendIndicatorResult IsUptrend(Prices prices,int dayCount) { if(null==prices||prices.Count