Hi everyone! 👋👋
I'm currently working on developing an indicator in WealthLab that requires incorporating data from both lower and higher timeframes. For the higher timeframes, I've successfully utilized TimeSeriesCompressor and TimeSeriesSynchronizer to manage and synchronize the data accordingly.
However, I'm encountering some challenges when trying to incorporate lower timeframe data into the same indicator (e.g., using M15 data in an H1 chart analysis or strategy).
So far, I've considered two main approaches:
- Utilizing the smallest timeframe data across the board and overlaying intermediate timeframe candles onto the smaller ones. I'm concerned this might result in repeated bars that simply overwrite previous ones, potentially cluttering the analysis.
- Employing GetHistory method from IHost to directly fetch the symbol's data for the desired lower timeframe.
Before I proceed further, I wanted to reach out to this knowledgeable community for advice:
- Has anyone here tackled a similar challenge of integrating lower timeframe data into higher timeframe indicators in WealthLab?
- Are there any best practices or alternative approaches you'd recommend for efficiently incorporating lower timeframe data without causing redundancy or performance issues?
- Specifically, are there any tips or considerations when using GetHistory for this purpose, or is there a better method I haven't considered yet?
Thank you in advance for any insights or suggestions you can share!
I'm currently working on developing an indicator in WealthLab that requires incorporating data from both lower and higher timeframes. For the higher timeframes, I've successfully utilized TimeSeriesCompressor and TimeSeriesSynchronizer to manage and synchronize the data accordingly.
However, I'm encountering some challenges when trying to incorporate lower timeframe data into the same indicator (e.g., using M15 data in an H1 chart analysis or strategy).
So far, I've considered two main approaches:
- Utilizing the smallest timeframe data across the board and overlaying intermediate timeframe candles onto the smaller ones. I'm concerned this might result in repeated bars that simply overwrite previous ones, potentially cluttering the analysis.
- Employing GetHistory method from IHost to directly fetch the symbol's data for the desired lower timeframe.
Before I proceed further, I wanted to reach out to this knowledgeable community for advice:
- Has anyone here tackled a similar challenge of integrating lower timeframe data into higher timeframe indicators in WealthLab?
- Are there any best practices or alternative approaches you'd recommend for efficiently incorporating lower timeframe data without causing redundancy or performance issues?
- Specifically, are there any tips or considerations when using GetHistory for this purpose, or is there a better method I haven't considered yet?
Thank you in advance for any insights or suggestions you can share!
Rename
For an indicator, use TimeSeriesCompressor and TimeSeriesSynchronizer.
See the example code for TimeSeriesCompressor.ToMinute().
Keep in mind that this returns a TimeSeries, not IndicatorBase, so you have to adjust the plot functions for TimeSeries.
See the example code for TimeSeriesCompressor.ToMinute().
Keep in mind that this returns a TimeSeries, not IndicatorBase, so you have to adjust the plot functions for TimeSeries.
Yes, I'm already using TimeSeries. It was a typo. I'm still looking for a more straightforward solution than the ones I mentioned.
The problem your having might be more obvious to us if we saw what you were actually doing, but using GetHistory() to access a smaller interval in a higher timeframe is generally not the way to go.
The base scale (the chart scale) should be the lowest interval that you need. Everything else can be scaled up from that in an easy, straightforward way, like in the example I pointed you to.
I make an exception for what I said about GetHistory() for Daily indicators that need a lot of seed data. For example, if you need a 20-day Daily SMA in your 1 minute chart, I'd grab the Daily bars with GetHistory() and sync it to the intraday time frame.
The base scale (the chart scale) should be the lowest interval that you need. Everything else can be scaled up from that in an easy, straightforward way, like in the example I pointed you to.
I make an exception for what I said about GetHistory() for Daily indicators that need a lot of seed data. For example, if you need a 20-day Daily SMA in your 1 minute chart, I'd grab the Daily bars with GetHistory() and sync it to the intraday time frame.
Thank you! This helps a lot.
So, I thought about doing everything on the smallest scale and maybe create indicators for the candles of the larger scales, with lower opacity.
So, I thought about doing everything on the smallest scale and maybe create indicators for the candles of the larger scales, with lower opacity.
Your Response
Post
Edit Post
Login is required