This indicator offers the user a trade-off between recalculating indicator values at every tick versus calculating them at bar-close. You control the number of times the indicator values are calculated in a bar via the Sampling Frequency Parameter. This is useful for indicators which perform a lot of calculations but do not require the value to be updated at every tick, especially when used for larger time-frame bars.
To create a sampled indicator, derive your custom indicator from the AviatSampledIndicator class. Replace the standard NT virtual functions with their corresponding Aviat versions (e.g. OnBarUpdate => AviateOnBarUpdate). The download contains the base indicator and an illustrative example which shows how to convert the TSI indicator to its Sampled version.
The indicator has been tested on NT7 ONLY, and only on single time-frame indicators. https://nexusfi.com/platforms-indicators/3565-anyone-have-any-hints-optimizing-c-code-7.html has some more details.
Category The Elite Circle
|
|
|