-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
-
Hi @kernc,
I found very cool this option you provide to visualize superimposed charts.
I would like to know, if it is possible to accomplish other time frames combinations as well ? (1 min & 5 min / 3 min & 15 min / 5 min & 15 min). Even if I had to provide df1
and df2
already resampled.
Beta Was this translation helpful? Give feedback.
All reactions
You could, e.g., resample original df
to '3T'
(3 min) and pass bt.plot(..., superimpose='15T')
?
Other than that, you could roll as many as you want of your own line indicators:
... def resample(period, df): return df.Open.resample(period).first(), df.Close.resample(period).last() self.resampled15t = self.I(resample, '15T', self.data.df, overlay=True) ...
Replies: 3 comments 4 replies
-
You could, e.g., resample original df
to '3T'
(3 min) and pass bt.plot(..., superimpose='15T')
?
Other than that, you could roll as many as you want of your own line indicators:
... def resample(period, df): return df.Open.resample(period).first(), df.Close.resample(period).last() self.resampled15t = self.I(resample, '15T', self.data.df, overlay=True) ...
Beta Was this translation helpful? Give feedback.
All reactions
-
Hi @kernc, thanks for your reply.
It seems to be working now.
I just have a doubt.
- I noticed when using 3T with 15T, I can' t visualize only the higher frame when scroll to zoom in, zoom out (in your example with daily data I can see only the higher frame when I zoom in, zoom out). It it possible to modify the colors_lighter parameter to make it easy to visualize the higher frame as well?
Beta Was this translation helpful? Give feedback.
All reactions
-
If you're as zoomed out to not distinguish the superimposed bars, you won't distinguish the main bars if you make the superimposed colors any less light. I think the defaults are reasonable.
You can quite easily change the colors in your own copy, at this place:
backtesting.py/backtesting/_plotting.py
Lines 474 to 475 in 7671f04
I'd appreciate a screenshot. 😜
Beta Was this translation helpful? Give feedback.
All reactions
-
Hi @kernc, thanks again.
During the zoom in transition using your website example with daily and monthly superimposed data, it appears good as below:
When I try to zoom in my 3T / 15T chart, the transition appears like this:
Although both of them works fine after finish zooming transition:
I will try to change some lightness parameters just to see if works fine for my case.
Thanks a lot for your help;
Beta Was this translation helpful? Give feedback.
All reactions
-
Beta Was this translation helpful? Give feedback.
All reactions
-
When I try to zoom in my 3T / 15T chart, the transition appears like this:
Although both of them works fine after finish zooming transition
The level-of-detail change is from Bokeh:
the plot only draws a small fraction of data points during interactive operations (panning or zooming, for example)
Beta Was this translation helpful? Give feedback.
All reactions
-
Thanks again @kernc . I didn`t know about these parameters.
I will have a look on that.
Beta Was this translation helpful? Give feedback.