Indicator · Pine Script v6 · On the chart

Market Trend Machine Learning Signals

by vedkanani123· code credited to Forex_Market_Insights

A price-chart indicator that detects swing structure, draws dynamic support and resistance zones from stored pivots, and issues signals only when a confidence percentage, a quality score and an ADX strength minimum are met.

View on GitHub

GitHub stars1on the repository
Pine versionv6current
Lines of code653
Settings39inputs
LicenceNone stated
Last update2 months ago23 Aug 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

Zone touches within a window, volume confirmation and a cooldown shape entries. Each signal draws a stop padded by ATR, targets at R multiples, and a trade box that can cancel on a trend flip before the first target. A dashboard summarises state.

Details

Published by

vedkanani123 on GitHub

Code credit

Forex_Market_Insights, as written in the script's header

Draws

On the price chart

Markets

Any symbol

Timeframes

Any timeframe

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Settings

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

SettingTypeDefaultVariable
Sensitivity (1 = slow, 10 = fast)int6sens
Swing Length (structure pivots)int8swingLen
ATR Lengthint14atrLen
Use Volume Confirmation (if available)booltrueuseVol
Zone Lookback (bars)int250zoneLook
Zone Width (× ATR)float0.90zoneW
Pivot Memory (levels stored)int30zoneMem
Show Support ZonebooltrueshowSup
Show Resistance ZonebooltrueshowRes
Minimum Confidence % for Signalint70confTh
Minimum Signal Quality Scoreint45minQual
Minimum Trend Strength (ADX)float15minAdx
Show all 39 settings
SettingTypeDefaultVariable
Zone Touch Window (bars)int6touchWin
Signal Cooldown (bars)int12coolDown
Stop Loss Padding (× ATR)float0.60slPad
TP1 (R multiple)float1.0tp1R
TP2 (R multiple)float2.0tp2R
TP3 (R multiple)float3.0tp3R
Final Target (R multiple)float4.5tpFR
Cancel Trade on Trend Flip (before TP1)booltrueflipCncl
Trade Box Extension (bars)int18extBars
Show DashboardbooltrueshowDash
Dashboard SizestringMediumdashSize
Dashboard PositionstringTop RightdashPos
Backgroundcolorcolor.new(#0d1117, 12)dashBg
Bordercolorcolor.new(#3b4754, 0)dashBrd
Textcolorcolor.new(#e6e9ef, 0)dashTxt
Bullish Colorcolor#089981bullC
Bearish Colorcolor#f23645bearC
Neutral Colorcolor#787b86neutC
Target Box Colorcolor#2962fftpC
Support Zone Colorcolor#26a69asupC
Resistance Zone Colorcolor#ef5350resC
Trade Line / Label Colorcolor#9598a1lineC
Zone Transparencyint78zoneTr
Show Structure Break LinesbooltrueshowBOSl
Show Adaptive Trend LineboolfalseshowTrLn
Trend Candle ColoringboolfalsecolorBar
Trend Background TintboolfalsebgPaint
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

257 stars

This indicator overlays an intraday SPX and ES chart with a midnight session range, regular-trading-hours opening levels, and a VWAP projection box. It draws the midnight high, mid, and low, flags edge rejections within an absolute tolerance, and plots optiona

Indicator v6 TrendSupport & resistance
Updated 6 weeks ago · None stated GitHub repository of SPX Midnight Box + Snag Logic
53 stars

Apex Trend & Liquidity Master calculates a trend cloud using customizable moving averages expanded by a volatility multiplier directly on the main price chart. It identifies dynamic support and resistance liquidity zones from swing high and low pivots, extendi

Indicator v6 TrendSupport & resistance
Updated 2 months ago · MPL-2.0 GitHub repository of Apex Trend & Liquidity Master

Market Monitor - 1m

by chris-c-thomas
14 stars

Market Monitor - 1m is an overlay indicator designed for multi-chart monitoring and directional bias assessment. It plots a fast, mid, and slow EMA ribbon with a fill cloud, session VWAP with standard deviation bands, and previous day key levels. It evaluates

Indicator v6 TrendMoving averages Repaints
Updated 6 months ago · MIT GitHub repository of Market Monitor - 1m
13 stars

The Adaptive Trend Finder calculates logarithmic linear regression channels overlaid on the price chart. Operating on the most recent historical bar, it fits a log-transformed regression line and standard deviation bands. It evaluates linear correlation using

Indicator v6 TrendSupport & resistance Repaints
Updated 6 months ago · MIT GitHub repository of Adaptive Trend Finder (log)

5 EMAs

by hirawatt
11 stars

5 EMAs calculates and plots five Exponential Moving Averages derived from five configurable timeframes directly onto the main price chart. It also plots the high and low lines fetched from an additional custom timeframe, accompanied by a small on-screen table

Indicator v4 Moving averagesTrend Repaints
Updated 2 years ago · MIT GitHub repository of 5 EMAs
9 stars

Adaptive Supertrend is an overlay indicator that dynamically adjusts its Supertrend band width using a composite conviction score. Conviction is derived from ATR percentile ranking, trend force from EMA distance, and chop detection, narrowing the bands during

Indicator v6 TrendVolatility & bands
Updated 2 days ago · MIT GitHub repository of Adaptive Supertrend

More Support & resistance 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