Indicator · Pine Script v6 · On the chart

Adaptive Fibonacci Trailing System

by majixai

An indicator that finds swing structure with pivots, draws a Fibonacci cloud and levels, and runs an adaptive trailing line that changes with a trend, range or volatile regime from ADX and ATR.

View on GitHub

GitHub stars1on the repository
Pine versionv6current
Lines of code1,607
Settings40inputs
LicenceNone stated
Last update2 days ago28 Oct 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

Signals come from a trailing flip or from a cross of the 0.5 level, with strictness and breakout confirmation filters. Optional risk tools add stop loss and three take profit lines, break-even after the first target, a confidence score, adaptive sizing and a backtest tracker. It draws on the price chart.

Details

Published by

majixai on GitHub

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
Pivot Lengthint13pivotLenInput
Min Swing Scorefloat1.0minSwingScoreInput
ADX Lengthint14adxLenInput
Trend Thresholdfloat22.0adxTrendInput
Volatile Threshold (×ATR)float1.6volatilityMultInput
Trailing ModestringAdaptive (Auto)trailModeInput
Signal ModestringSIGMODE_CROSSsignalModeInput
0.5 Cross StrictnessstringSTRICT_FULLcrossStrictnessInput
Breakout Confirmation (×ATR)float0.2confirmFilterInput
Min Body Ratiofloat0.5bodyFilterInput
Show Fib CloudbooltrueshowCloudInput
Cloud StylestringGradientcloudStyleInput
Show all 40 settings
SettingTypeDefaultVariable
Show Confluence MarkersboolfalseshowConfluenceInput
Show Fib LevelsbooltrueshowFibLevelsInput
Enable Risk ManagementbooltrueenableRMInput
Risk PresetstringBalancedriskPresetInput
ATR Length (RM)int14atrLenRiskInput
SL ×ATR (Custom)float1.5slMultInput
TP1 ×Risk (Custom)float1.0tp1MultInput
TP2 ×Risk (Custom)float2.0tp2MultInput
TP3 ×Risk (Custom)float3.0tp3MultInput
Show SL/TP LinesbooltrueshowSlTpInput
Show SL/TP LabelsbooltrueshowSlTpLabelsInput
Break-Even After TP1booltrueuseBreakEvenInput
Enable Confidence ScorebooltrueuseConfidenceInput
Min Confidence %float50.0minConfidenceInput
Adaptive Position SizingbooltrueuseAdaptiveSizingInput
Base Risk per Trade %float1.0baseRiskPctInput
Enable Backtest TrackerbooltrueuseBacktestInput
Show Per-Grade StatsbooltrueshowPerGradeInput
Reset BacktestboolfalseresetBacktestInput
ThemestringAutothemeInput
Show Buy/Sell SignalsbooltrueshowSignalsInput
Show Trailing LinebooltrueshowTrailLineInput
Highlight Regime ChangesboolfalseshowRegimeBgInput
Show Swing LabelsboolfalseshowSwingLabelsInput
Show WatermarkbooltrueshowWatermarkInput
Label Font SizestringSmalllabelFontSizeInput
Show DashboardbooltrueshowDashInput
PositionstringTop RightdashPosStr
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

[RS]Donchian Fans

by ricardosantos79
261 stars

This indicator plots Donchian Channel boundary lines along with dynamic fan projections directly on the price chart. It calculates the highest high, lowest low, and median price over a customizable lookback period. Whenever price establishes a new channel high

Indicator v4 Support & resistanceTrend
Updated 4 years ago · None stated GitHub repository of [RS]Donchian Fans

Dynamic Linear Regression

by TradersPost
228 stars

Dynamic Linear Regression calculates and plots linear regression trendlines and standard deviation channels directly on the price chart over a user-selected time period. Traders can configure static channels locked at the end time, dynamic channels that contin

Indicator v6 TrendSupport & resistance
Updated 3 months ago · None stated GitHub repository of Dynamic Linear Regression

ATR Trailing Stop

by mihakralj
99 stars

Calculates an ATR-based trailing stop overlaid on the price chart to assist with trend identification and stop placement. Using a specified ATR period and multiplier, it projects upper and lower bounds around the closing price. The stop line ratchets up during

Indicator v5 TrendVolatility & bands
Updated 4 weeks ago · Apache-2.0 GitHub repository of ATR Trailing Stop

Moon Dev Lunar Sniper

by moondevonyt
92 stars

Moon Dev Lunar Sniper is a multi-indicator overlay that scores confluence across fast and slow EMAs, RSI, MACD, DMI, and BB width to fire signals only when score meets the minimum threshold. It plots buy and sell signals on the price chart, highlights cosmic b

Indicator v6 TrendOscillators & momentum Repaints
Updated 2 months ago · Custom licence GitHub repository of Moon Dev Lunar Sniper

SuperTrend & Pivots

by dcaoyuan
55 stars

This overlay indicator plots a SuperTrend line on the price chart using a fixed ATR length of 10 and a factor of 3. When the trend direction is up it draws a green line and a light green fill toward the candle midpoint; when down it draws a red line and a ligh

Indicator v6 TrendVolatility & bands
Updated 6 months ago · Apache-2.0 GitHub repository of SuperTrend & Pivots

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