Replies: 1 comment
-
Created #356 for this enhancement request. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I love backtesting.py and I use it extensively. I love that it can seamlessly integrate pandas-ta, ta-lib etc. and shows chart in html.
But There's something that I noticed which kind of makes it difficult to read indicator values if you're backtesting for longer period. Below is an example of an indicator view on the chart without zooming in. Notice the y axis scales.

Now, when I zoom in to focus on a specific period when ttm squeeze value stayed between -5 to +5, it still shows the full scale from -15 to+20. which makes it really hard to visualize the indicator chart. See below.

I know that re-scaling is allowed for the price chart. Is that something that can be implemented on the indicator charts as well?
[UPDATE]
I fiddled around with the code and made it work :)
Here's what I did:
I have added code
right above
backtesting.py/backtesting/_plotting.py
Line 526 in 0a76e96
then,
right below these lines
backtesting.py/backtesting/_plotting.py
Lines 610 to 611 in 0a76e96
then,
right below these lines
backtesting.py/backtesting/autoscale_cb.js
Lines 30 to 33 in 0a76e96
Here's how it looks on the graph:
Without Zooming in:

When Zoomed in:

Beta Was this translation helpful? Give feedback.
All reactions