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,39 @@
using Managing.Common;
using Managing.Domain.Candles;
using Skender.Stock.Indicators;
namespace Managing.Domain.Strategies.Base;
public abstract class EmaBaseStrategy : Strategy
{
protected EmaBaseStrategy(string name, Enums.Timeframe timeframe, Enums.StrategyType type) : base(name, timeframe, type)
{
}
protected List<CandleEma> MapEmaToCandle(List<EmaResult> ema, IEnumerable<Candle> candles)
{
var emaList = new List<CandleEma>();
foreach (var candle in candles)
{
var currentEma = ema.Find(candle.Date);
if (currentEma != null && currentEma.Ema.HasValue)
{
emaList.Add(new CandleEma()
{
Close = candle.Close,
Open = candle.Open,
Date = candle.Date,
Ticker = candle.Ticker,
Exchange = candle.Exchange,
Ema = currentEma.Ema.Value,
});
}
}
return emaList;
}
public class CandleEma : Candle
{
public double Ema { get; set; }
}
}