Skip to content
All library documents

Technical Indicator Formulas and Implementations Across Trading Languages

Article FMZ forum · Author: Zero

Summary

This document presents source code for a technical analysis library, with implementations shown in JavaScript and C++ and a title that also refers to Python. Shared helper routines handle missing values, moving differences, rolling sums and averages, and initialization periods. The indicator functions include simple, exponential, and smoothed moving averages; MACD; Bollinger Bands; KDJ; RSI; on-balance volume; and average true range, with additional material partly omitted.

The code illustrates how common indicators can be calculated from closing prices or OHLCV records, including recursive smoothing and rolling-window calculations. This makes the document useful as an implementation reference for readers studying indicator construction. It provides no market data, strategy rules, tests, or evidence that these calculations generate profitable signals. Implementations can differ in their treatment of missing values, warm-up periods, edge cases, and initialization, so users should compare formulas and verify outputs before relying on them.

Key ideas

  • Helper routines define how the library handles missing values and moving-window calculations.
  • Moving averages use simple, exponential, and smoothed update methods.
  • MACD is formed from fast and slow exponential averages, a smoothed signal line, and their difference.
  • Bollinger Bands combine a moving average with a rolling standard deviation multiplier.
  • RSI, KDJ, on-balance volume, and average true range are also implemented, but the excerpt is incomplete.
  • The code offers no trading performance results or validation against reference calculations.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.