feat: improved doc-string for plot-annotations
This commit is contained in:
@@ -1142,9 +1142,10 @@ class AwesomeStrategy(IStrategy):
|
|||||||
) -> list[AnnotationType]:
|
) -> list[AnnotationType]:
|
||||||
"""
|
"""
|
||||||
Retrieve area annotations for a chart.
|
Retrieve area annotations for a chart.
|
||||||
Must be returned as array, with label, start, end, y_start, y_end and color.
|
Must be returned as array, with type, label, color, start, end, y_start, y_end.
|
||||||
All settings are optional - though it usually makes sense to include either "start and end"
|
All settings except for type are optional - though it usually makes sense to include either
|
||||||
or "y_start and y_end" for either horizontal or vertical plots (or all 4 for boxes).
|
"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 pair: Pair that's currently analyzed
|
||||||
:param start_date: Start date of the chart data being requested
|
:param start_date: Start date of the chart data being requested
|
||||||
:param end_date: End 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]:
|
) -> list[AnnotationType]:
|
||||||
"""
|
"""
|
||||||
Retrieve area annotations for a chart.
|
Retrieve area annotations for a chart.
|
||||||
Must be returned as array, with label, start, end, y_start, y_end and color.
|
Must be returned as array, with type, label, color, start, end, y_start, y_end.
|
||||||
All settings are optional - though it usually makes sense to include either "start and end"
|
All settings except for type are optional - though it usually makes sense to include either
|
||||||
or "y_start and y_end" for either horizontal or vertical plots (or all 4 for boxes).
|
"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 pair: Pair that's currently analyzed
|
||||||
:param start_date: Start date of the chart data being requested
|
:param start_date: Start date of the chart data being requested
|
||||||
:param end_date: End 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,
|
merge_informative_pair,
|
||||||
stoploss_from_absolute,
|
stoploss_from_absolute,
|
||||||
stoploss_from_open,
|
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.
|
:param **kwargs: Ensure to keep this here so updates to this won't break your strategy.
|
||||||
"""
|
"""
|
||||||
pass
|
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