Is there a way to add the partial bar streaming to indicators that I have created?
Rename
Sure. Look for this [optional] method in the Indicator API example:
CODE:
public override bool CalculatePartialValue()
Yes, you can add partial bar calculations to an indicator. You need to define a
CalculatePartialValue() method in your implementation to do so. Go to https://www.wealth-lab.com/Support/ExtensionApi/IndicatorLibrary and look at the SMA example to see how.
Do appreciate, to make this work, all the intermediate indicators you might be using in your indicator implementation must also have this feature incorporated in their code. If they don't, then you need to ask the developers to add it. Alternatively, if the intermediate indicator(s), which lacks the partial bar feature, is a smoother (i.e. relatively stable over time), then you could just employ its most recent value for the partial bar calculation of your own indicator; that would save some CPU cycles.
WealthLab is designed to not call CalculatePartialValue() more than twice a second, so it won't be called for every tick, which is a good thing.
CalculatePartialValue() method in your implementation to do so. Go to https://www.wealth-lab.com/Support/ExtensionApi/IndicatorLibrary and look at the SMA example to see how.
Do appreciate, to make this work, all the intermediate indicators you might be using in your indicator implementation must also have this feature incorporated in their code. If they don't, then you need to ask the developers to add it. Alternatively, if the intermediate indicator(s), which lacks the partial bar feature, is a smoother (i.e. relatively stable over time), then you could just employ its most recent value for the partial bar calculation of your own indicator; that would save some CPU cycles.
WealthLab is designed to not call CalculatePartialValue() more than twice a second, so it won't be called for every tick, which is a good thing.
Your Response
Post
Edit Post
Login is required