- Enhanced the `UserIndicator` class to include an optional `timeframe` attribute for custom indicator timeframes. - Updated the `get_indicator_data` method in `MarketDataIntegrator` to fetch and calculate indicators based on the specified timeframe, ensuring proper data alignment and handling. - Modified the `ChartBuilder` to pass the correct DataFrame for plotting indicators with different timeframes. - Added UI elements in the indicator modal for selecting timeframes, improving user experience. - Updated relevant JSON templates to include the new `timeframe` field for all indicators. - Refactored the `prepare_chart_data` function to ensure it returns a DataFrame with a `DatetimeIndex` for consistent calculations. This commit enhances the flexibility and usability of the indicator system, allowing users to analyze data across various timeframes.
22 lines
507 B
JSON
22 lines
507 B
JSON
{
|
|
"id": "macd_307935a7",
|
|
"name": "MACD Fast",
|
|
"description": "Fast MACD (5, 13, 4) for quick signals",
|
|
"type": "macd",
|
|
"display_type": "subplot",
|
|
"parameters": {
|
|
"fast_period": 5,
|
|
"slow_period": 13,
|
|
"signal_period": 4
|
|
},
|
|
"styling": {
|
|
"color": "#dc3545",
|
|
"line_width": 2,
|
|
"opacity": 1.0,
|
|
"line_style": "solid"
|
|
},
|
|
"timeframe": "1h",
|
|
"visible": true,
|
|
"created_date": "2025-06-04T04:16:35.459602+00:00",
|
|
"modified_date": "2025-06-06T07:03:58.642238+00:00"
|
|
} |