docker files fixes from liaqat

This commit is contained in:
alirehmani
2024-05-03 16:39:25 +05:00
commit 464a8730e8
587 changed files with 44288 additions and 0 deletions

View File

@@ -0,0 +1,58 @@
using Managing.Domain.Candles;
using Managing.Core;
using static Managing.Common.Enums;
using Managing.Domain.Scenarios;
namespace Managing.Domain.Strategies
{
public class Strategy : IStrategy
{
public Strategy(string name, Timeframe timeframe, StrategyType type)
{
Name = name;
Timeframe = timeframe;
Candles = new List<Candle>();
Type = type;
SignalType = ScenarioHelpers.GetSignalType(type);
}
public string Name { get; set; }
public Timeframe Timeframe { get; set; }
public List<Candle> Candles { get; set; }
public StrategyType Type { get; set; }
public SignalType SignalType { get; set; }
public int MinimumHistory { get; set; }
public int? Period { get; set; }
public int? FastPeriods { get; set; }
public int? SlowPeriods { get; set; }
public int? SignalPeriods { get; set; }
public double? Multiplier { get; set; }
public int? SmoothPeriods { get; set; }
public int? StochPeriods { get; set; }
public int? CyclePeriods { get; set; }
public virtual List<Signal> Run()
{
return new List<Signal>();
}
public void UpdateCandles(HashSet<Candle> newCandles)
{
lock (Candles)
{
foreach (var item in newCandles.ToList())
{
if (Candles.All(c => c.Date != item.Date))
{
Candles.AddItem(item);
}
}
}
}
public string GetName()
{
return Name;
}
}
}