v11 added no delay versions of ta.stoch, ta.macd, ta.stc and a speed optimized version of ta.stdev
Added:
stdev_fast(src, length)
Parameters:
src (float)
length (simple int)
macd_custom(source, fast, slow, signal, osc_ma, sig_ma)
MACD (moving average convergence/divergence). It is supposed to reveal changes in the strength, direction, momentum, and duration of a trend in a stock's price.\n\nReturns\nTuple of three MACD series: MACD line, signal line and histogram line. This adapted version extends ta.macd to start without delay at first bar and deliver usable data instead of na. It also allows to use custom moving average algorithms
Parameters:
source (float): (simple int) optional
fast (simple int): (simple int) optional
slow (simple int): (simple int) optional
signal (simple int): (simple int) optional
osc_ma (simple MovingAverage): (simple MovingAverage) optional select a custom function for the MACD calculation
sig_ma (simple MovingAverage): (simple MovingAverage) optional select a custom function for the MACD signal calculation
macd(source, fast, slow, signal)
MACD (moving average convergence/divergence). It is supposed to reveal changes in the strength, direction, momentum, and duration of a trend in a stock's price.\n\nReturns\nTuple of three MACD series: MACD line, signal line and histogram line. This adapted version extends ta.macd to start without delay at first bar and deliver usable data instead of na.
Parameters:
source (float): (simple int) optional
fast (simple int): (simple int) optional
slow (simple int): (simple int) optional
signal (simple int): (simple int) optional
stoch(source, h, l, length)
Stochastic. It is calculated by a formula: 100 * (close - lowest(low, length)) / (highest(high, length) - lowest(low, length)). This adapted version extends ta.stoch to start without delay at first bar and deliver usable data instead of na.
Parameters:
source (float)
h (float)
l (float)
length (int)
stc(source, fast, slow, cycle, d1, d2)
Calculates the value of the Schaff Trend Cycle indicator. This adapted version extends ta.stc to start without delay at first bar and deliver usable data instead of na.
Parameters:
source (float): (series int/float) optional Series of values to process. (default: close)
fast (simple int): (simple int) optional Length for the MACD fast smoothing parameter calculation. (default: 26)
slow (simple int): (simple int) optional Length for the MACD slow smoothing parameter calculation. (default: 50)
cycle (simple int): (simple int) optional Number of bars for the Stochastic values (length). (default: 12)
d1 (simple int): (simple int) optional Length for the initial %D smoothing parameter calculation. (default: 3)
d2 (simple int): (simple int) optional Length for the final %D smoothing parameter calculation. (default: 3)
Returns: (float) The oscillator value.
stc_fast(source, fast, slow, cycle, scale)
Returns the Schaff Trend Cycle (STC) (similar to MACD, but faster). This adapted version extends ta.stc to start without delay at first bar and deliver usable data instead of na.
Parameters:
source (float): (series int/float) optional allows to calculate STC for another symbol or timeframe by passing its close series (obtain with request.security) (default: close)
fast (simple int): (simple int) optional fast moving average length (default: 23)
slow (simple int): (simple int) optional slow moving average length (default: 50)
cycle (simple int): (simple int) optional stochastic length (default: 10)
scale (simple float): (simple float) optional if you want to tweak the speed the trend changes. (default: 0.5)
Returns: float stc