This commit is contained in:
2024-02-22 14:52:53 -05:00
parent 72c94666c5
commit 29b417e3f7
445 changed files with 360852 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
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;
}
}
}