TradingView
forexpirate
8 aug 2016 23:52

Indicator Integrator 

British Pound/New Zealand DollarFXCM

Beskrivning

Here is a light piece of code, The Indicator Integrator. It sums up a function (like an integral for you calculus folks). Unlike the 'cum' function that does a million bars of look back you can change the look back period, like limits of integration.
Built in is a difference of the close from an SMA. And there is an ROC. By changing what is summed up in the loop you can sum up the differences from the SMA or sum up the ROC. Pick your SMA length/ROC length. Then pick your look back period of how much to add up (bars to add up). There is a built in SMA smoother of three bars on the final summation.

Comments welcomed
Kommentarer
ShirokiHeishi
nice thanks for this, could be very helpful
Mer