mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 08:33:07 +00:00
feat: improved doc-string for plot-annotations
This commit is contained in:
@@ -1142,9 +1142,10 @@ class AwesomeStrategy(IStrategy):
|
||||
) -> list[AnnotationType]:
|
||||
"""
|
||||
Retrieve area annotations for a chart.
|
||||
Must be returned as array, with label, start, end, y_start, y_end and color.
|
||||
All settings are optional - though it usually makes sense to include either "start and end"
|
||||
or "y_start and y_end" for either horizontal or vertical plots (or all 4 for boxes).
|
||||
Must be returned as array, with type, label, color, start, end, y_start, y_end.
|
||||
All settings except for type are optional - though it usually makes sense to include either
|
||||
"start and end" or "y_start and y_end" for either horizontal or vertical plots
|
||||
(or all 4 for boxes).
|
||||
:param pair: Pair that's currently analyzed
|
||||
:param start_date: Start date of the chart data being requested
|
||||
:param end_date: End date of the chart data being requested
|
||||
|
||||
@@ -840,9 +840,10 @@ class IStrategy(ABC, HyperStrategyMixin):
|
||||
) -> list[AnnotationType]:
|
||||
"""
|
||||
Retrieve area annotations for a chart.
|
||||
Must be returned as array, with label, start, end, y_start, y_end and color.
|
||||
All settings are optional - though it usually makes sense to include either "start and end"
|
||||
or "y_start and y_end" for either horizontal or vertical plots (or all 4 for boxes).
|
||||
Must be returned as array, with type, label, color, start, end, y_start, y_end.
|
||||
All settings except for type are optional - though it usually makes sense to include either
|
||||
"start and end" or "y_start and y_end" for either horizontal or vertical plots
|
||||
(or all 4 for boxes).
|
||||
:param pair: Pair that's currently analyzed
|
||||
:param start_date: Start date of the chart data being requested
|
||||
:param end_date: End date of the chart data being requested
|
||||
|
||||
@@ -28,6 +28,7 @@ from freqtrade.strategy import (
|
||||
merge_informative_pair,
|
||||
stoploss_from_absolute,
|
||||
stoploss_from_open,
|
||||
AnnotationType,
|
||||
)
|
||||
|
||||
# --------------------------------
|
||||
|
||||
@@ -399,3 +399,21 @@ def order_filled(
|
||||
:param **kwargs: Ensure to keep this here so updates to this won't break your strategy.
|
||||
"""
|
||||
pass
|
||||
|
||||
def plot_annotations(
|
||||
self, pair: str, start_date: datetime, end_date: datetime, dataframe: DataFrame, **kwargs
|
||||
) -> list[AnnotationType]:
|
||||
"""
|
||||
Retrieve area annotations for a chart.
|
||||
Must be returned as array, with type, label, color, start, end, y_start, y_end.
|
||||
All settings except for type are optional - though it usually makes sense to include either
|
||||
"start and end" or "y_start and y_end" for either horizontal or vertical plots
|
||||
(or all 4 for boxes).
|
||||
:param pair: Pair that's currently analyzed
|
||||
:param start_date: Start date of the chart data being requested
|
||||
:param end_date: End date of the chart data being requested
|
||||
:param dataframe: DataFrame with the analyzed data for the chart
|
||||
:param **kwargs: Ensure to keep this here so updates to this won't break your strategy.
|
||||
:return: List of AnnotationType objects
|
||||
"""
|
||||
return []
|
||||
|
||||
Reference in New Issue
Block a user