Financial markets' analysts use [Technical Indicator]s in Technical Analyses as for graphing visualisations of quantitative models. Technical Analyses are elaborated in parallel to another studies, approached in a so called Fundamental Analysis.
Questions tagged [technical-indicator]
170 questions
23
votes
13 answers
Heiken Ashi Using pandas python
I was defining a function Heiken Ashi which is one of the popular chart type in Technical Analysis.
I was writing a function on it using Pandas but finding little difficulty.
This is how Heiken Ashi [HA] looks like-
Heikin-Ashi…

Wacky Tacky
- 331
- 1
- 3
- 6
15
votes
4 answers
How to use technical indicators of TA-Lib with pandas in python
I am new to python and pandas and mainly learning it to diversify my programming skills as well as of the advantage of python as a general programme language. In this programme I am using it to fetch historical data's from yahoo and do some…

Eka
- 14,170
- 38
- 128
- 212
14
votes
1 answer
How to correctly calculate Fisher Transform indicator
I'm writing a small technical analysis library that consists of items that are not availabile in TA-lib. I've started with an example I found on cTrader and matched it against the code found in the TradingView version.
Here's the Pine Script code…

Dan Beaulieu
- 19,406
- 19
- 101
- 135
11
votes
2 answers
Pandas: Zigzag segmentation of data based on local minima-maxima
I have a timeseries data. Generating data
date_rng = pd.date_range('2019-01-01', freq='s', periods=400)
df = pd.DataFrame(np.random.lognormal(.005, .5,size=(len(date_rng), 3)),
columns=['data1', 'data2', 'data3'],
…

Thanh Nguyen
- 902
- 2
- 12
- 31
9
votes
1 answer
MACD Function Returning Incorrect Values
I am trying to use PHPs trader functions (available as a PECL extension) to calculate the moving average convergence/divergence (MACD) of various securities. However, the values returned do not seem to match my calculations.
Consider the following…

Tim
- 2,123
- 4
- 27
- 44
5
votes
8 answers
Failed to build ta-lib ERROR: Could not build wheels for ta-lib, which is required to install pyproject.toml-based project
I'm getting below error, while pip installing ta-lib.
I used command :
!pip install ta-lib
Please provide me solution.
Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/
Collecting ta-lib
Using…

Parjanya Chopkar
- 51
- 1
- 1
- 3
5
votes
1 answer
How to implement the Hindenburg omen indicator?
As defined here the Hindenburg omen indicator is:
The daily number of new 52-week highs and 52-week lows in a stock market index are greater than a threshold amount (typically 2.2%).
To me it means, we roll daily and look back 52 weeks or 252…

SkyWalker
- 13,729
- 18
- 91
- 187
4
votes
4 answers
how to calculate true range
In technical analysis true range is the difference between the high and the low plus any gap that occurred between sessions. So if today's high is 10 and the low is 9 range is 1. If yesterdays close was 9.5 then true range is also one, but if…

John
- 435
- 6
- 15
4
votes
0 answers
calculation of RSI(Relative Strength Index) Using ta4j java library is incorrect
This is my Class to fetch the list of OHLC (open, high, low, close) also the volume and date. i have separated each one of the arraylist for each stocksymbol. i have used my local API to fetch the data. To perform all these calculation i have used…

Sudin Ranjitkar
- 51
- 1
- 4
4
votes
1 answer
Calculating weighted moving average using pandas Rolling method
I calculate simple moving average:
def sma(data_frame, length=15):
# TODO: Be sure about default values of length.
smas = data_frame.Close.rolling(window=length, center=False).mean()
return smas
Using the rolling function is it possible…

xkcd
- 2,538
- 11
- 59
- 96
3
votes
1 answer
Julia add indicator to candlestick chart
I'm new to Julia and I'm trying to add a technical indicator (let it be a simple moving average) to my candlestick chart. How should I do that?
using Plots, MarketData, TimeSeries
gr()
ta = yahoo(:GOOG, YahooOpt(period1 = now() -…

Fatafim
- 287
- 2
- 13
3
votes
3 answers
How to code and compile mql4 and mql5 language in VS Code?
I moved to mql4 and mql5 programming language. But, MetaEditor is very noob to code with,
so I want to code mql4 language and compile with VS Code.
If you have any solution please share with us.....
Thanks

Yousuf Ahamad
- 23
- 1
- 6
3
votes
0 answers
How to calculate the average true range (ATR) by only using numpy?
How to calculate the average true range (ATR) by only using numpy? I prefer the fastest way possible.
Atr calculation:
Pandas & Numpy:
import numpy as np
import pandas as pd
high_low = data['High'] - data['Low']
high_close = np.abs(data['High'] -…

AlgoQ
- 117
- 2
- 11
3
votes
2 answers
SuperTrend code using pandas python
I am trying to code the following algorithm for SuperTrend indicator in python using pandas.
BASIC UPPERBAND = (HIGH + LOW) / 2 + Multiplier * ATR
BASIC LOWERBAND = (HIGH + LOW) / 2 - Multiplier * ATR
FINAL UPPERBAND = IF( (Current BASICUPPERBAND <…

arkochhar
- 369
- 1
- 4
- 10
3
votes
2 answers
RSI vs Wilder's RSI Calculation Problems
I am having trouble getting a smoothed RSI. The below picture is from freestockcharts.com. The calculation uses this code.
public static double CalculateRsi(IEnumerable closePrices)
{
var prices = closePrices as double[] ??…

Mike Smith
- 39
- 1
- 3