Skip to content

Auto-scale Y-axis for indicators when zooming #356 #357

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 18 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove y-axis scaling logic for PnL graph #356
  • Loading branch information
zlpatel authored Jun 13, 2021
commit 95e03f8b61ca1491008f4befb655d97521eefe6f
8 changes: 0 additions & 8 deletions backtesting/autoscale_cb.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,6 @@ window._bt_autoscale_timeout = setTimeout(function () {
min = Math.min.apply(null, source.data['ohlc_low'].slice(i, j));
_bt_scale_range(ohlc_range, min, max, true);

if (pl_range) {
max = Math.max.apply(null, source.data['return_pct'].slice(i, j));
min = Math.min.apply(null, source.data['return_pct'].slice(i, j));
if(min && max){
_bt_scale_range(pl_range, min, max, true);
}
}

if (volume_range) {
max = Math.max.apply(null, source.data['Volume'].slice(i, j));
_bt_scale_range(volume_range, 0, max * 1.03, false);
Expand Down