Files
Encelado/Old/Models/IndicatorModels.cs
T

95 lines
2.6 KiB
C#

namespace TradingBot.Models;
/// <summary>
/// Configuration for a trading indicator
/// </summary>
public class IndicatorConfig
{
public string Id { get; set; } = string.Empty;
public string Name { get; set; } = string.Empty;
public string Description { get; set; } = string.Empty;
public IndicatorType Type { get; set; }
public bool IsEnabled { get; set; } = true;
// Thresholds for signals
public decimal? OverboughtThreshold { get; set; }
public decimal? OversoldThreshold { get; set; }
public decimal? BuyThreshold { get; set; }
public decimal? SellThreshold { get; set; }
// Indicator-specific parameters
public int Period { get; set; } = 14;
public int FastPeriod { get; set; } = 12;
public int SlowPeriod { get; set; } = 26;
public int SignalPeriod { get; set; } = 9;
}
/// <summary>
/// Real-time indicator signal
/// </summary>
public class IndicatorSignal
{
public string IndicatorId { get; set; } = string.Empty;
public string IndicatorName { get; set; } = string.Empty;
public string Symbol { get; set; } = string.Empty;
public DateTime Timestamp { get; set; } = DateTime.UtcNow;
public SignalStrength Strength { get; set; }
public SignalType Type { get; set; }
public string Message { get; set; } = string.Empty;
public decimal? Value { get; set; }
}
/// <summary>
/// Indicator status for a specific asset
/// </summary>
public class IndicatorStatus
{
public string IndicatorId { get; set; } = string.Empty;
public string Symbol { get; set; } = string.Empty;
public decimal CurrentValue { get; set; }
public decimal? PreviousValue { get; set; }
public MarketCondition Condition { get; set; }
public string Recommendation { get; set; } = string.Empty;
public DateTime LastUpdate { get; set; } = DateTime.UtcNow;
}
/// <summary>
/// Types of trading indicators
/// </summary>
public enum IndicatorType
{
RSI, // Relative Strength Index
MACD, // Moving Average Convergence Divergence
SMA, // Simple Moving Average
EMA, // Exponential Moving Average
BollingerBands, // Bollinger Bands
Stochastic, // Stochastic Oscillator
Volume, // Volume indicators
ATR // Average True Range (volatility)
}
/// <summary>
/// Signal strength levels
/// </summary>
public enum SignalStrength
{
Weak,
Moderate,
Strong,
VeryStrong
}
/// <summary>
/// Market condition based on indicators
/// </summary>
public enum MarketCondition
{
Neutral,
Overbought,
Oversold,
Bullish,
Bearish,
Ranging,
Trending
}