feat(core): add shared DTOs, MqttTopics constants, DatabaseBootstrapper, and ManagedMqttClient extensions
This commit is contained in:
@@ -0,0 +1,124 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace FinlyticCore.Dtos.TechnicalAnalysis;
|
||||
|
||||
/// <summary>
|
||||
/// Major category of a chart pattern.
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(JsonStringEnumConverter<PatternCategory>))]
|
||||
public enum PatternCategory
|
||||
{
|
||||
Candlestick,
|
||||
Chart,
|
||||
SmartMoney
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Directional bias indicated by a pattern or technical setup.
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(JsonStringEnumConverter<PatternBias>))]
|
||||
public enum PatternBias
|
||||
{
|
||||
Bullish,
|
||||
Bearish,
|
||||
Neutral
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Specific pattern type recognized by pattern detection engines.
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(JsonStringEnumConverter<PatternType>))]
|
||||
public enum PatternType
|
||||
{
|
||||
// Candlestick Patterns
|
||||
Hammer,
|
||||
ShootingStar,
|
||||
BullishEngulfing,
|
||||
BearishEngulfing,
|
||||
MorningStar,
|
||||
EveningStar,
|
||||
Doji,
|
||||
|
||||
// Classical Chart Patterns
|
||||
DoubleBottom,
|
||||
DoubleTop,
|
||||
HeadAndShoulders,
|
||||
InverseHeadAndShoulders,
|
||||
AscendingTriangle,
|
||||
DescendingTriangle,
|
||||
|
||||
// Smart Money Concepts (SMC)
|
||||
FairValueGapBullish,
|
||||
FairValueGapBearish,
|
||||
LiquiditySweepHigh,
|
||||
LiquiditySweepLow,
|
||||
BreakOfStructure,
|
||||
ChangeOfCharacter,
|
||||
OrderBlock
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Strategy exit model defining how positions are closed or trailed.
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(JsonStringEnumConverter<ExitStrategyType>))]
|
||||
public enum ExitStrategyType
|
||||
{
|
||||
StagedScaleOutWithBreakEven,
|
||||
PureTrailingStop,
|
||||
DynamicBandTouch,
|
||||
FixedSingleTarget,
|
||||
IndicatorReversal
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Type of trailing stop mechanic.
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(JsonStringEnumConverter<TrailingStopType>))]
|
||||
public enum TrailingStopType
|
||||
{
|
||||
AtrMultiplier,
|
||||
SuperTrendLine,
|
||||
SwingPoints
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Direction of a technical trading setup signal.
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(JsonStringEnumConverter<SignalDirection>))]
|
||||
public enum SignalDirection
|
||||
{
|
||||
Buy,
|
||||
Sell,
|
||||
Neutral
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overall market or asset technical regime.
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(JsonStringEnumConverter<MarketRegime>))]
|
||||
public enum MarketRegime
|
||||
{
|
||||
BullishTrending,
|
||||
BearishTrending,
|
||||
HighVolatilityChoppy,
|
||||
LowVolatilityRangebound
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Which recurring FinlyticTechnicals selection mechanism added an ISIN to the continuously-scanned universe
|
||||
/// (<c>TechnicalUniverseManager</c> in FinlyticTechnicals). Defined here rather than in FinlyticTechnicals
|
||||
/// because it is carried on <see cref="StrategyResultDto.UniverseSource"/> across the MQTT boundary into
|
||||
/// FinlyticEngine's evaluation snapshot, so more than one service needs it (Rules.md §3).
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(JsonStringEnumConverter<UniverseSource>))]
|
||||
public enum UniverseSource
|
||||
{
|
||||
/// <summary>Promoted temporarily because FinlyticSentiment reported a strong/shifting sentiment reading.</summary>
|
||||
SentimentSpike = 1,
|
||||
|
||||
/// <summary>Favorited by at least one user, aggregated across all users via FinlyticBackend.</summary>
|
||||
UserFavorite = 2,
|
||||
|
||||
/// <summary>Part of FinlyticAssets' curated discovery/watchlist asset set.</summary>
|
||||
Discovery = 3
|
||||
}
|
||||
Reference in New Issue
Block a user