- ago
Is there a way to add the partial bar streaming to indicators that I have created?
0
84
2 Replies

Reply

Bookmark

Sort
Cone8
 ( 17.63% )
- ago
#1
Sure. Look for this [optional] method in the Indicator API example:
CODE:
public override bool CalculatePartialValue()
1
- ago
#2
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.
1

Reply

Bookmark

Sort