mirror of
https://github.com/kernc/backtesting.py.git
synced 2024-01-28 15:29:30 +03:00
ENH: Also show indicator centerline if mean around 0.5
This commit is contained in:
@@ -483,6 +483,7 @@ return this.labels[index] || "";
|
||||
# Add dashed centerline just because
|
||||
mean = float(pd.Series(arr).mean())
|
||||
if not np.isnan(mean) and (abs(mean) < .1 or
|
||||
round(abs(mean), 1) == .5 or
|
||||
round(abs(mean), -1) in (50, 100, 200)):
|
||||
fig.add_layout(Span(location=float(mean), dimension='width',
|
||||
line_color='#666666', line_dash='dashed',
|
||||
|
||||
Reference in New Issue
Block a user