Linear Regression Slope. Should return the same values as the standard LinRegSlope. However, the standard version iterates on every update, making it especially inefficient for intrabar (tick) data. This version does not iterate on intrabar updates. Version 1.0.
I just stood on his shoulders and converted it to my style. This version uses much less memory, is simpler for me to follow, and has a startup phase where it has a pretty good estimate instead of no value set.
It can be constructed from my generic MA adaptor (jhlMA) with only a period specified, providing a default phase value of 0.
February 12th, 2011
Size: 15.66 KB
Downloaded: 335 times
827
fluxsmith
Maximum value seen in period. Should return the same values as the standard MAX, which as of b18 has been fixed to reduce iteration. With that fixed the only advantage this has over the standard is memory reduction when used as a component and not displayed. (Both versions are now efficient with CalculateOnBarClose == false.)
Version 2 - Corrected calculation errors when COBC == false && Input != High
July 4th, 2010
Size: 2.31 KB
Downloaded: 278 times
527
fluxsmith
I came across "McGinley Dynamic" in a thread on this forum. On further investigation I found two entirely different formulas referred to by that name. This indicator implements a variation based on the following formula:
v[0] = v[1] + (Close[0] - v[1]) / (.618 * n * (Close[0] / v[1]) ^ 4)
Now that I can see the result, it doesn't appear to me to be any more useful as an average than an EMA of the same period. However I think it may make a good trigger line vs an EMA of the same period.
February 15th, 2011
Size: 5.23 KB
Downloaded: 416 times
834
fluxsmith
Minimum value seen in period. Should return the same values as the standard MIN, which as of b18 has been fixed to reduce iteration. With that fixed the only advantage this has over the standard is memory reduction when used as a component and not displayed. (Both versions are now efficient with CalculateOnBarClose == false.)
Version 2 - Corrected calculation errors when COBC == false && Input != Low
July 4th, 2010
Size: 2.32 KB
Downloaded: 260 times
526
fluxsmith
Wikipedia calls this a 'Modified Moving Average'. Traders may know it as Welles Wilder's Moving Average, as it is the averaging method used in many of his indicators.
It's conceptually simpler than an EMA, the basic formula being:
average = (newValue + priorAverage * (n - 1)) / n
However, for any number of periods 'n', the outcome is identical to EMA(2 * n - 1). Since my basic indicators are all about efficient code reuse that is the implementation used here. Using the EMA formula is also slightly more CPU efficient than the formula above.
Returns the Pearson product-moment correlation coefficient of the input series. This requires iteration, so should probably be used with CalculateOnBarClose == true.
Version 2 - Solves a /0 error, returns 0 if price is unchanged for all of the bars in the calculation.
July 4th, 2010
Size: 2.52 KB
Downloaded: 211 times
529
fluxsmith
Polarized Fractal Efficiency. This does not return similar values to the NT supplied PFE, which does not implement the formulas I've found by this name. My indicator's waveform is similar enough to thinkorswim's to conclude that I have implemented the algorithm represented correctly. This indicator does not iterate. Version 1.0.