Trend
Average Directional Movement
This indicator attempts to quantify trend strength by measuring the amount of movement in a single direction.
Sources
Parameters:
Name | Type | Description | Default |
---|---|---|---|
high | Series |
| required |
low | Series |
| required |
close | Series |
| required |
length | int | The period. Default: | None |
signal_length | int | Signal period. Default: | None |
adxr_length | int | ADXR period. Default: | None |
scalar | float | Scalar. Default: | None |
talib | bool | If installed, use TA Lib. Default: | None |
tvmode | bool | Trading View. Default: | None |
mamode | str | See | None |
drift | int | Difference amount. Default: | None |
offset | int | Post shift. Default: | None |
Other Parameters:
Name | Type | Description |
---|---|---|
fillna | value |
|
Returns:
Type | Description |
---|---|
DataFrame | 4 columns |
Note
signal_length
is like TradingView's default ADX.
Alpha Trend
This indicator attempts to filter sideways movement for accurate signals.
Sources
Parameters:
Name | Type | Description | Default |
---|---|---|---|
open_ | Series |
| required |
high | Series |
| required |
low | Series |
| required |
close | Series |
| required |
volume | Series |
| None |
src | str | One of: "open", "high", "low" or "close". Default: | None |
length | int | ATR, MFI, or RSI period. Default: | None |
multiplier | float | Trailing ATR multiple. Default: | None |
threshold | float | Momentum threshold. Default: | None |
lag | int | Lag period of main trend. Default: | None |
mamode | str | See | None |
talib | bool | If installed, use TA Lib. Default: | None |
offset | int | Post shift. Default: | None |
Other Parameters:
Name | Type | Description |
---|---|---|
fillna | value |
|
Returns:
Type | Description |
---|---|
DataFrame | 2 columns |
Archer Moving Averages Trends
This indicator, by Kevin Johnson, attempts to identify both long run and short run trends.
Sources
- Kevin Johnson
- tradingview
Parameters:
Name | Type | Description | Default |
---|---|---|---|
close | Series |
| required |
fast | int | Fast MA period. Default: | None |
slow | int | Slow MA period. Default: | None |
lookback | int | Lookback period for | None |
mamode | str | See | None |
offset | int | Post shift. Default: | None |
Other Parameters:
Name | Type | Description |
---|---|---|
run_length | int | OBV trend period. Default: |
fillna | value |
|
Returns:
Type | Description |
---|---|
DataFrame | 2 columns |
Note
Both the long run and short run values are integers, where 1
is a trend and 0
is not a trend.
Aroon & Aroon Oscillator
This indicator attempts to identify trends and their magnitude.
Sources
Parameters:
Name | Type | Description | Default |
---|---|---|---|
high | Series |
| required |
low | Series |
| required |
length | int | The period. Default: | None |
scalar | float | Scalar. Default: | None |
talib | bool | If installed, use TA Lib. Default: | None |
offset | int | Post shift. Default: | None |
Other Parameters:
Name | Type | Description |
---|---|---|
fillna | value |
|
Returns:
Type | Description |
---|---|
DataFrame | 3 columns |
NOTICE
Thanks to all those that have sponsored and dontated to the library in the past! Your support has been greatly appreciated!
However, future releases are on definite hold until 100+ donations of $150+ have been received via Buy Me a Coffee.
Help keep this library and application the best in it's class!
Choppiness Index
This indicator, by E.W. Dreiss, attempts to determine choppiness.
Sources
- E.W. Dreiss an Australian Commodity Trader
- motivewave
- tradingview
Parameters:
Name | Type | Description | Default |
---|---|---|---|
high | Series |
| required |
low | Series |
| required |
close | Series |
| required |
length | int | The period. Default: | None |
atr_length | int | ATR period. Default: | None |
ln | bool | Use | None |
scalar | float | Scalar. Default: | None |
drift | int | Difference amount. Default: | None |
offset | int | Post shift. Default: | None |
Other Parameters:
Name | Type | Description |
---|---|---|
fillna | value |
|
Returns:
Type | Description |
---|---|
Series | 1 column |
Note
- Choppy:
~ 100
- Trending:
~ 0
Chande Kroll Stop
This indicator, by Tushar Chande and Stanley Kroll, attempts to identify trends with long and short stops.
Sources
- "The New Technical Trader", Wiley 1st ed. ISBN 9780471597803, page 95
- multicharts
Parameters:
Name | Type | Description | Default |
---|---|---|---|
close | Series |
| required |
p | int | ATR and first stop period; see Note. Default: | None |
x | float | ATR scalar; see Note. Default: | None |
q | int | Second stop period; see Note. Default: | None |
tvmode | bool | Trading View mode. Default: | None |
mamode | str | See | None |
offset | int | Post shift. Default: | None |
Other Parameters:
Name | Type | Description |
---|---|---|
fillna | value |
|
Returns:
Type | Description |
---|---|
DataFrame | 2 columns |
Book vs TradingView Defaults
- Book:
p=10, x=3, q=20, ma="sma"
- Trading View:
p=10, x=1, q=9, ma="rma"
Decay
This function creates a decay moving forward from prior signals.
Sources
Parameters:
Name | Type | Description | Default |
---|---|---|---|
close | Series |
| required |
length | int | The period. Default: | None |
mode | str | Either | None |
offset | int | Post shift. Default: | None |
Other Parameters:
Name | Type | Description |
---|---|---|
fillna | value |
|
Returns:
Type | Description |
---|---|
Series | 1 column |
Decreasing
This indicator, by Kevin Johnson, attempts to identify decreasing periods.
Sources
- Kevin Johnson
Parameters:
Name | Type | Description | Default |
---|---|---|---|
close | Series |
| required |
length | int | The period. Default: | None |
strict | bool | Check if continuously increasing. Default: | None |
percent | float | Percent, i.e. | None |
asint | bool | Returns as | None |
drift | int | Difference amount. Default: | None |
offset | int | Post shift. Default: | None |
Other Parameters:
Name | Type | Description |
---|---|---|
fillna | value |
|
Returns:
Type | Description |
---|---|
Series | 1 column |
Detrend Price Oscillator
This indicator attempts to detrend (remove the trend) and identify cycles.
Sources
Parameters:
Name | Type | Description | Default |
---|---|---|---|
close | Series |
| required |
length | int | The period. Default: | None |
centered | bool | Shift the dpo back by | True |
offset | int | Post shift. Default: | None |
Other Parameters:
Name | Type | Description |
---|---|---|
fillna | value |
|
Returns:
Type | Description |
---|---|
Series | 1 column |
Possible Data Leak
Set centered=False
to remove data leakage. See Issue #60.
Hilbert Transform TrendLine
This indicator uses the Hilbert Transform to smooth values.
Sources
- John F Ehlers's "Rocket Science for Traders" Book
- mql5
- TA-Lib ta_HT_TRENDLINE
Parameters:
Name | Type | Description | Default |
---|---|---|---|
close | Series |
| required |
talib | bool | If installed, use TA Lib. Default: | None |
prenan | int | Prenans to apply. Ehlers's | None |
offset | int | Post shift. Default: | None |
Other Parameters:
Name | Type | Description |
---|---|---|
fillna | value |
|
Returns:
Type | Description |
---|---|
Series | 1 column |
Warning
TA-Lib Correlation: np.float64(0.9979308363057683)
Tip
Corrective contributions welcome!
NOTICE
Thanks to all those that have sponsored and dontated to the library in the past! Your support has been greatly appreciated!
However, future releases are on definite hold until 100+ donations of $150+ have been received via Buy Me a Coffee.
Help keep this library and application the best in it's class!
Increasing
This indicator, by Kevin Johnson, attempts to identify increasing periods.
Sources
- Kevin Johnson
Parameters:
Name | Type | Description | Default |
---|---|---|---|
close | Series |
| required |
length | int | The period. Default: | None |
strict | bool | Check if continuously increasing. Default: | None |
percent | float | Percent, i.e. | None |
asint | bool | Returns as | None |
drift | int | Difference amount. Default: | None |
offset | int | Post shift. Default: | None |
Other Parameters:
Name | Type | Description |
---|---|---|
fillna | value |
|
Returns:
Type | Description |
---|---|
Series | 1 column |
Long Run
This indicator, by Kevin Johnson, attempts to identify long runs.
Sources
- Kevin Johnson
- tradingview
Parameters:
Name | Type | Description | Default |
---|---|---|---|
fast | Series |
| required |
slow | Series |
| required |
length | int | The | None |
offset | int | Post shift. Default: | None |
Other Parameters:
Name | Type | Description |
---|---|---|
fillna | value |
|
Returns:
Type | Description |
---|---|
Series | 1 column |
Parabolic Stop and Reverse
This indicator, by J. Wells Wilder, attempts to identify trend direction and potential reversals.
Sources
Parameters:
Name | Type | Description | Default |
---|---|---|---|
high | Series |
| required |
low | Series |
| required |
close | Series | Optional | None |
af0 | float | Initial Acceleration Factor. Default: | None |
af | float | Acceleration Factor. Default: | None |
max_af | float | Maximum Acceleration Factor. Default: | None |
offset | int | Post shift. Default: | None |
Other Parameters:
Name | Type | Description |
---|---|---|
fillna | value |
|
Returns:
Type | Description |
---|---|
DataFrame | 4 columns |
Warning
TA-Lib Correlation: np.float64(0.9837617513753181)
Tip
Corrective contributions welcome!
Q Stick
This indicator, by Tushar Chande, attempts to quantify and identify trends.
Sources
Parameters:
Name | Type | Description | Default |
---|---|---|---|
open_ | Series |
| required |
close | Series |
| required |
length | int | The period. Default: | None |
mamode | str | See | None |
offset | int | Post shift. Default: | None |
Other Parameters:
Name | Type | Description |
---|---|---|
fillna | value |
|
Returns:
Type | Description |
---|---|
Series | 1 column |
Random Walk Index
This indicator attempts to identify the difference between a trend and a random walk.
Sources
Parameters:
Name | Type | Description | Default |
---|---|---|---|
high | Series |
| required |
low | Series |
| required |
close | Series |
| required |
length | int | The period. Default: | None |
mamode | str | See | None |
talib | bool | If installed, use TA Lib. Default: | None |
drift | int | Difference amount. Default: | None |
offset | int | Post shift. Default: | None |
Other Parameters:
Name | Type | Description |
---|---|---|
fillna | value |
|
Returns:
Type | Description |
---|---|
DataFrame | 2 columns |
Short Run
This indicator, by Kevin Johnson, attempts to identify short runs.
Sources
- Kevin Johnson
- tradingview
Parameters:
Name | Type | Description | Default |
---|---|---|---|
fast | Series |
| required |
slow | Series |
| required |
length | int | The | None |
offset | int | Post shift. Default: | None |
Other Parameters:
Name | Type | Description |
---|---|---|
fillna | value |
|
Returns:
Type | Description |
---|---|
Series | 1 column |
Trendflex
This trend indicator, by John F. Ehlers, complements the "reflex" indicator.
Sources
- rengel8 (2021-08-11) based on the implementation from "ProRealCode" (2021-08-11)
- prorealcode
- traders
Parameters:
Name | Type | Description | Default |
---|---|---|---|
close | Series |
| required |
length | int | The period. Default: | None |
smooth | int | Super Smoother period. Default: ```20```` | None |
alpha | float | Alpha weight. Default: | None |
pi | float | Ehlers's truncated value: | None |
sqrt2 | float | Ehlers's truncated value: | None |
offset | int | Post shift. Default: | None |
Other Parameters:
Name | Type | Description |
---|---|---|
fillna | value |
|
Returns:
Type | Description |
---|---|
Series | 1 column |
Note
John F. Ehlers introduced two indicators within the article "Reflex: A New Zero-Lag Indicator” in February 2020, TASC magazine. One of which is Reflex, a lag reduced cycle indicator. Both indicators (Reflex/Trendflex) are oscillators that complement each other with the focus for cycle and trend.
TTM Trend
This indicator, by John Carter, labels bars green, 1
, or red -1
, when above or below the average value.
Sources
- John Carter, book “Mastering the Trade”
- prorealcode
Parameters:
Name | Type | Description | Default |
---|---|---|---|
high | Series |
| required |
low | Series |
| required |
close | Series |
| required |
length | int | The period. Default: | None |
offset | int | Post shift. Default: | None |
Other Parameters:
Name | Type | Description |
---|---|---|
fillna | value |
|
Returns:
Type | Description |
---|---|
DataFrame | 1 column |
Tip
- Two bars of the opposite color is the signal to get in or out.
- Recommended to stay in trade if colors do not change.
NOTICE
Thanks to all those that have sponsored and dontated to the library in the past! Your support has been greatly appreciated!
However, future releases are on definite hold until 100+ donations of $150+ have been received via Buy Me a Coffee.
Help keep this library and application the best in it's class!
Vertical Horizontal Filter
This indicator, by Adam White, attempts to identify trending and ranging markets.
Sources
Parameters:
Name | Type | Description | Default |
---|---|---|---|
close | Series |
| required |
length | int | The period. Default: | None |
offset | int | Post shift. Default: | None |
Other Parameters:
Name | Type | Description |
---|---|---|
fillna | value |
|
Returns:
Type | Description |
---|---|
Series | 1 column |
Vortex
This indicator attempts to capture positive and negative trend movement using two oscillators.
Sources
Parameters:
Name | Type | Description | Default |
---|---|---|---|
high | Series |
| required |
low | Series |
| required |
close | Series |
| required |
length | int | The period. Default: | None |
drift | int | Difference amount. Default: | None |
offset | int | Post shift. Default: | None |
Other Parameters:
Name | Type | Description |
---|---|---|
fillna | value |
|
Returns:
Type | Description |
---|---|
DataFrame | 2 columns |
Zigzag
This indicator attempts to filter out smaller movements while identifying trend direction. It does not predict future trends, but it does identify swing highs and lows.
Sources
Parameters:
Name | Type | Description | Default |
---|---|---|---|
high | Series |
| required |
low | Series |
| required |
close | Series |
| None |
legs | int | Number of legs (> 2). Default: | None |
deviation | float | Reversal deviation percentage. Default: | None |
backtest | bool | | None |
offset | int | Post shift. Default: | None |
Other Parameters:
Name | Type | Description |
---|---|---|
fillna | value |
|
Returns:
Type | Description |
---|---|
DataFrame | 2 columns |
Deviation
When deviation=10
, it shows movements greater than 10%
.
Backtest Mode
Ensures the DataFrame is safe for backtesting. By default, swing points are returned on the pivot index. Intermediate swings are not returned at all. This mode swing detection is placed on the bar that would have been detected. Furthermore, changes in swing levels are also included instead of only the final value.
- Use the following formula to get the true index of a pivot:
p_i = i - int(floor(legs / 2))
Warning
A Series reversal will create a new line.