TraderMathLibrary "TraderMath"
A collection of essential trading utilities and mathematical functions used for technical analysis,
including DEMA, Fisher Transform, directional movement, and ADX calculations.
dema(source, length)
โโCalculates the value of the Double Exponential Moving Average (DEMA).
โโParameters:
โโโโ source (float) : (series int/float) Series of values to process.
โโโโ length (simple int) : (simple int) Length for the smoothing parameter calculation.
โโReturns: (float) The double exponentially weighted moving average of the `source`.
roundVal(val)
โโConstrains a value to the range .
โโParameters:
โโโโ val (float) : (float) Value to constrain.
โโReturns: (float) Value limited to the range .
fisherTransform(length)
โโComputes the Fisher Transform oscillator, enhancing turning point sensitivity.
โโParameters:
โโโโ length (int) : (int) Lookback length used to normalize price within the high-low range.
โโReturns: (float) Fisher Transform value.
dirmov(len)
โโCalculates the Plus and Minus Directional Movement components (DI+ and DIโ).
โโParameters:
โโโโ len (simple int) : (int) Lookback length for directional movement.
โโReturns: (float ) Array containing .
adx(dilen, adxlen)
โโComputes the Average Directional Index (ADX) based on DI+ and DIโ.
โโParameters:
โโโโ dilen (simple int) : (int) Lookback length for directional movement calculation.
โโโโ adxlen (simple int) : (int) Smoothing length for ADX computation.
โโReturns: (float) Average Directional Index value (0โ100).
Libreria Pine Scriptยฎ












