Add trading signal and execution layers with database integration

- Introduced `TradingSignalLayer` and `TradeExecutionLayer` for visualizing buy/sell signals and trade entries/exits on charts.
- Implemented signal validation and filtering mechanisms to ensure data integrity and user-configurable options.
- Enhanced market data layout to support new timeframes for improved user experience.
- Updated documentation to reflect the new signal layer architecture and its integration with the dashboard.
- Ensured compatibility with existing components while maintaining a modular structure for future enhancements.
This commit is contained in:
Vasily.onl
2025-06-04 15:54:14 +08:00
parent cdee9f04d6
commit 5506f5db64
4 changed files with 1059 additions and 9 deletions

View File

@@ -25,6 +25,10 @@ def get_market_data_layout():
# Create dropdown options
symbol_options = [{'label': symbol, 'value': symbol} for symbol in symbols]
timeframe_options = [
{'label': "1 Second", 'value': '1s'},
{'label': "5 Seconds", 'value': '5s'},
{'label': "15 Seconds", 'value': '15s'},
{'label': "30 Seconds", 'value': '30s'},
{'label': '1 Minute', 'value': '1m'},
{'label': '5 Minutes', 'value': '5m'},
{'label': '15 Minutes', 'value': '15m'},
@@ -34,9 +38,9 @@ def get_market_data_layout():
]
# Filter timeframe options to only show those available in database
available_timeframes = [tf for tf in ['1m', '5m', '15m', '1h', '4h', '1d'] if tf in timeframes]
available_timeframes = [tf for tf in ['1s', '5s', '15s', '30s', '1m', '5m', '15m', '1h', '4h', '1d'] if tf in timeframes]
if not available_timeframes:
available_timeframes = ['1h'] # Default fallback
available_timeframes = ['5m'] # Default fallback
timeframe_options = [opt for opt in timeframe_options if opt['value'] in available_timeframes]