Skip to main content

Functions calculations and explanation

Below are the explanations and calculations for each of the available functions.

1. Bollinger Bands (BB)

Description for new traders:
Bollinger Bands help you understand whether a stock is overbought or oversold by looking at how far its price has moved from the average. Prices tend to stay within the bands, so when the price moves outside, it may signal a trend change.

Bollinger Bands consist of three lines:

  • The middle band is a simple moving average (SMA).
  • The upper band is the middle band plus two times the standard deviation.
  • The lower band is the middle band minus two times the standard deviation.

Calculation:

Middle Band = SMA(n)
Upper Band = SMA(n) + (k * STDDEV(n))
Lower Band = SMA(n) - (k * STDDEV(n))

Where:

  • n = period
  • k = typically 2 for the standard bands

2. Simple Moving Average (SMA)

Description for new traders:
The SMA shows the average price of an asset over a specific time period. It helps you see the overall direction of the trend by smoothing out short-term fluctuations.

Calculation:

SMA = (P1 + P2 + ... + Pn) / n

Where:

  • P1, P2, ..., Pn = prices over the period
  • n = number of periods

3. Chandelier Exit

Description for new traders:
The Chandelier Exit helps you decide when to sell or exit a trade by setting a trailing stop based on price volatility.

Calculation:

Chandelier Exit = Highest High(n) - (k * ATR(n))

Where:

  • n = period
  • k = multiplier, typically 3

4. Exponential Moving Average (EMA)

Description for new traders:
The EMA is similar to the SMA but gives more importance to recent prices, making it more responsive to changes in the market.

Calculation:

EMA = (Pt * (2 / (n + 1))) + (EMA(t-1) * (1 - (2 / (n + 1))))

Where:

  • Pt = price at time t
  • EMA(t-1) = previous EMA value
  • n = period

5. Linear Regression (LR)

Description for new traders:
Linear Regression shows the general direction of a stock's price by fitting a straight line through the prices over time.

Calculation:

LR(t) = α + β * t

Where:

  • α = intercept
  • β = slope
  • t = time period

6. Relative Strength Index (RSI)

Description for new traders:
The RSI helps you identify overbought or oversold conditions in the market. A value above 70 often means overbought, while below 30 means oversold.

Calculation:

RSI = 100 - (100 / (1 + RS))

Where:

  • RS = Average Gain / Average Loss
  • The average gain and average loss are calculated over n periods.

7. Average True Range (ATR)

Description for new traders:
The ATR shows how much the price of an asset moves on average over a given period, helping measure market volatility.

Calculation:

ATR = (Σ True Range(i)) / n

Where:

  • n = period
  • True Range = max(High - Low, |High - Previous Close|, |Low - Previous Close|)

8. Stochastic Oscillator

Description for new traders:
The Stochastic Oscillator shows where the price is relative to its recent range, helping you identify potential trend reversals.

Calculation:

%K = ((Current Close - Lowest Low(n)) / (Highest High(n) - Lowest Low(n))) * 100

Where:

  • n = period
  • %K = stochastic value

9. Moving Average Convergence/Divergence (MACD)

Description for new traders:
The MACD helps you identify trends and potential reversals by comparing two moving averages of price.

Calculation:

MACD = EMA(12) - EMA(26)

Where:

  • 12 and 26 are the periods for the EMAs

10. Value of the Point from Current Position

Description for new traders:
This calculates the monetary value of a single point (or pip) movement in price, helping you measure potential gains or losses.

Calculation:

Value of 1 Point = 1 Pip / Current Price

11. Rate of Change (ROC)

Description for new traders:
The ROC shows how fast the price is changing over time, helping you spot momentum or trends.

Calculation:

ROC = ((Pt - P(t-n)) / P(t-n)) * 100

Where:

  • Pt = current price
  • P(t-n) = price n periods ago

12. Hilbert Transform - Dominant Cycle Period

Description for new traders:
The Hilbert Transform helps detect cycles or patterns in price movements that are not obvious at first glance.

Calculation:
This calculation involves complex mathematical processing and is usually done using the Hilbert Transform formula in the context of signal processing.

13. Parabolic SAR (Stop and Reverse)

Description for new traders:
The Parabolic SAR highlights potential price reversal points and helps you stay on the right side of a trend.

Calculation:

SAR(t+1) = SAR(t) + AF * (EP - SAR(t))

Where:

  • AF = acceleration factor
  • EP = extreme point (highest high or lowest low)

14. Median High/Low Deviation from Open

Description for new traders:
This indicator shows how far the current high or low is from the opening price, giving insight into intraday volatility.

Calculation:

Deviation = (High - Low) / Open

15. Standard Deviation (STDDEV)

Description for new traders:
Standard Deviation measures how spread out prices are from the average, helping you understand price volatility.

Calculation:

STDDEV = √((Σ(Xi - μ)^2) / n)

Where:

  • Xi = data points
  • μ = mean of the data points

16. Time Series Forecast (TSF)

Description for new traders:
The TSF predicts future prices based on historical trends, helping you anticipate market movements.

Calculation:
This method uses regression analysis to forecast future values based on the time series data.