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 VolumeTrendIndicator
  {
    private VolumeTrendIndicator()
    {
    }
    public static bool IsUptrend(Prices prices,int dayCount)
    {
      if(null==prices||prices.Count<dayCount) return false;
      float[] volume=prices.GetVolume();
      volume=volume.Take(dayCount).ToArray();
      volume=Numerics.Reverse(ref volume);
      double volumeSlope=Numerics.Slope(volume);
      return volumeSlope>0.00?true:false;
    }
  }
}
