Custom data series scale
Author: KGo
Creation Date: 11/20/2015 2:57 PM
profile picture

KGo

#1
I am trying to create a custom data series containing only specific bars from the primary series. Indicator analysis and sync to the primary would be needed. This is in effect a custom time scale.

How can the mybars data be put in a data series to be usable in indicator and sync operations? The commented out section fails as is. It was run on SPY 5 min bars.
CODE:
Please log in to see this code.
profile picture

Eugene

#2
1. Let's start with this:
CODE:
Please log in to see this code.

Using "0" should work with non-intraday scales only. For intraday time frames you have to direct Wealth-Lab by specifying some non-zero period. For 5-minute scale that would be 5 or you might substitute it with BarScale.BarInterval to stay flexible.

2. Did you mean this?
CODE:
Please log in to see this code.
profile picture

KGo

#3
1. BarScale does not have a definition for BarInterval so I think you meant Bars.BarInterval as in:
CODE:
Please log in to see this code.


2. Yes, I meant
CODE:
Please log in to see this code.


The Bars object can then be used with all the indicators and synced to the primary series. Thanks for your help.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).