mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-12-05 15:31:14 +00:00
docs: Improved plot annotations sample
This commit is contained in:
BIN
docs/assets/freqUI-chart-annotations-dark.png
Normal file
BIN
docs/assets/freqUI-chart-annotations-dark.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 111 KiB |
BIN
docs/assets/freqUI-chart-annotations-light.png
Normal file
BIN
docs/assets/freqUI-chart-annotations-light.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 109 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 90 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 86 KiB |
@@ -1180,8 +1180,8 @@ Entries will be validated, and won't be passed to the UI if they don't correspon
|
|||||||
|
|
||||||
### Plot annotations example
|
### Plot annotations example
|
||||||
|
|
||||||

|

|
||||||

|

|
||||||
|
|
||||||
??? Info "Code used for the plot above"
|
??? Info "Code used for the plot above"
|
||||||
This is an example code and should be treated as such.
|
This is an example code and should be treated as such.
|
||||||
@@ -1207,14 +1207,15 @@ Entries will be validated, and won't be passed to the UI if they don't correspon
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
elif (start_dt.hour % 2) == 0:
|
elif (start_dt.hour % 2) == 0:
|
||||||
|
price = dataframe.loc[dataframe["date"] == start_dt, ["close"]].mean()
|
||||||
mark_areas.append(
|
mark_areas.append(
|
||||||
{
|
{
|
||||||
"type": "area",
|
"type": "area",
|
||||||
"label": "2h",
|
"label": "2h",
|
||||||
"start": start_dt,
|
"start": start_dt,
|
||||||
"end": start_dt + timedelta(hours=1),
|
"end": start_dt + timedelta(hours=1),
|
||||||
"y_end": 1830,
|
"y_end": price * 1.01,
|
||||||
"y_start": 1860,
|
"y_start": price * 0.99,
|
||||||
"color": "rgba(0, 255, 0, 0.4)",
|
"color": "rgba(0, 255, 0, 0.4)",
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user