Resampled data candles looks very tiny
-
Hello,
I have 2 data feeds daily & weekly, and want only weekly to be shown on plotting.
I have this code to do this:
d0 = cerebro.resampledata(data, timeframe=bt.TimeFrame.Days, compression=1) d0.plotinfo.plot = False d1 = cerebro.resampledata(data, timeframe=bt.TimeFrame.Weeks )
but the problem is that date time axis still consist of days, and as result candles are very tiny.
ATR / CMO / EMA(ATR) - using weekly data feeds. so they should scale to weeks too.
Could you say please how to fix it?
-
@niceboss said in Resampled data candles looks very tiny:
but the problem is that date time axis still consist of days
Because the system has to tick at the rhythm of the lowest timeframe, i.e.:
Days
@niceboss said in Resampled data candles looks very tiny:
ATR / CMO / EMA(ATR) - using weekly data feeds. so they should scale to weeks too.
The data points are only calculated on the weekly feed, but they are scattered over a smaller timeframe on the plot.
-
So there is no way to resample timeframe to Weekly? because if i'll add Minute timeframe, it will even more tiny, but we only need this data to stop loss, for all other strategy decisions only weekly data feed used.
What is your suggestion in this situation?
-
@niceboss said in Resampled data candles looks very tiny:
So there is no way to resample timeframe to Weekly?
You are already resampling.
@niceboss said in Resampled data candles looks very tiny:
ecause if i'll add Minute timeframe, it will even more tiny
That has to do with plotting and not with resampling. Plotting is only meant as a visual aid.
@niceboss said in Resampled data candles looks very tiny:
What is your suggestion in this situation?
What is your expectation?
-
If I use only Weekly data feed, I have this plot - with wide bars.
I want to use multi timeframed data feeds in the same strategy, but on the plot to show show them as wide Weekly candles, the same as on image above.
-
Cannot be done with the plotting engine if you use lower timeframes.
Again: the system runs at the frequency of the lower timeframe (for example the broker, in case you issued orders for the daily data feed), which implies that the resulting number of data points the entire system has, is the number of data points of the daily feed.