Indicator · Pine Script v5 · On the chart

DeMark 9

by g-moe· code credited to goodgains

This indicator tracks Tom DeMark Sequential setup counts by comparing the current close against the close four bars prior across up to six configurable timeframes.

View on GitHub

Repaints

GitHub stars3on the repository
Pine versionv5runs as is
Lines of code193
Settings20inputs
LicenceNone stated
Last update5 months ago27 May 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.

Source Code

The code stays on GitHub. The author has not published this script under an open licence, so ForexR does not show its code. Copy script reads the file straight from GitHub into your clipboard, so you can still try it on your own chart. Ask the author before reusing the code anywhere else.

Overview

DeMark 9 signals potential trend exhaustion or reversal points when counts reach specified milestones, such as seven, eight, nine, or beyond. Main settings control which count numbers trigger notifications and let users customize the six monitored timeframes. Plotted directly on the price chart, multi-timeframe requests without bar offset can repaint until the higher timeframe bar closes.

Details

Published by

g-moe on GitHub

Code credit

goodgains, as written in the script's header

Draws

On the price chart

Markets

Any symbol

Timeframes

Any timeframe

Risk Notes

  • Signals can change on the live bar or after it closes (repainting)

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
Send Updates on Every Bar Closeboolfalsesend_updates_every_bar_close
use_alert_number_1booltrueuse_alert_number_1
use_alert_number_2booltrueuse_alert_number_2
use_alert_number_3booltrueuse_alert_number_3
Alert when greater than Alert Number 3booltruealert_higher_than_number_3
Alert Number ONEint7alert_number_1
Alert Number TWOint8alert_number_2
Alert Number THREEint9alert_number_3
use_tf_1booltrueuse_tf_1
use_tf_2booltrueuse_tf_2
use_tf_3booltrueuse_tf_3
use_tf_4booltrueuse_tf_4
Show all 20 settings
SettingTypeDefaultVariable
use_tf_5booltrueuse_tf_5
use_tf_6booltrueuse_tf_6
Timeframe Number ONEtimeframe5alert_tf_1
Timeframe Number TWOtimeframe30alert_tf_2
Timeframe Number THREEtimeframe60alert_tf_3
Timeframe Number FOURtimeframe120alert_tf_4
Timeframe Number FIVEtimeframe240alert_tf_5
Timeframe Number SIXtimeframeDalert_tf_6
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.

Similar Pine Scripts

947 stars

The Adaptive RSI Moving Average (ARSIMA) is an overlay indicator that dynamically adjusts its smoothing factor based on the Relative Strength Index (RSI). When the RSI moves toward extreme overbought or oversold conditions, the smoothing factor increases to ma

Indicator v4 Moving averagesOscillators & momentum
Updated 12 days ago · GPL-3.0 GitHub repository of Adaptive RSI Moving Average

The Momentum Setup is a multi-indicator visual tool designed for trend and momentum analysis directly on the price chart. It combines Relative Strength Index (RSI), Money Flow Index (MFI), Commodity Channel Index (CCI), Supertrend, and a 250-bar percentage cha

Indicator v5 Oscillators & momentumTrend
Updated 1 year ago · MPL-2.0 GitHub repository of Momentum Setup - Ankush Bajaj Momentum Investing Setup
257 stars

This indicator uses a Lorentzian distance k-nearest neighbors classification algorithm to predict market direction based on up to five technical features, such as RSI, WaveTrend, CCI, and ADX. It compares current feature values against historical bar patterns

Indicator v5 AI / machine learningOscillators & momentum
Updated 7 weeks ago · None stated GitHub repository of Donald - Machine Learning Options
228 stars

TradersPost Trading Checklist is an overlay indicator that evaluates a suite of popular technical conditions for long and short trade setups. It checks session-anchored VWAP, fast and slow EMA alignments and crosses, 200 SMA, RSI overbought or oversold conditi

Indicator v6 Screeners & dashboardsTrend
Updated 3 months ago · None stated GitHub repository of TradersPost Trading Checklist

Daily Trend Filter

by agutinbaigo28
147 stars

Calculates market regime conditions by combining RSI, MACD, and ADX/DMI indicators. It evaluates whether the market is in a strong bullish, strong bearish, neutral, or non-trending regime. The script plots a colored line overlaying the close price to reflect t

Indicator v5 TrendOscillators & momentum
Updated 6 weeks ago · MIT GitHub repository of Daily Trend Filter

AAPP

by capissimo
114 stars

This indicator plots an adaptive moving average or scaled RSI divergence line directly on the price chart. It calculates dual RSI series to measure momentum divergence, scales the values to the chart's price range, and constructs an adaptive average filtered b

Indicator v4 Moving averagesTrend
Updated 1 year ago · None stated GitHub repository of AAPP

More Trend scripts

Related on ForexR

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers