OPEN-SOURCE SCRIPT

50-Line Oscillator

289
Fractal Vortex Oscillator
Version 5 | Overlay: Off

Overview
The Fractal Vortex Oscillator blends multiple moving-average trends into a single, rainbow-colored “vortex” that highlights shifting market momentum and internal crossovers. By stacking 26 sequential moving averages (SMA, EMA, WMA) with gradually increasing lengths, it creates a rich, multicolored band whose twists and overlaps reveal trend strength and turning points.

Key Features

Dynamic Trend Lines (26):

Uses a mix of SMA, EMA, and WMA on your chosen source (default = close).

Base length starts at 14 and increases by 1 for each subsequent line.

Rainbow Coloring:

Seven semi-transparent hues (red → orange → yellow → green → blue → fuchsia → navy) cycle through the lines for easy visual separation.

Filled Bands:

Adjacent trend lines are softly filled with aqua-tinted shading to emphasize the vortex bands.

Crossover Counting:

Internally tallies the number of times faster lines cross over or under their immediate slower neighbors on each bar.

Displays a small gray label on price showing “Up: X / Down: Y” to quantify rising vs. falling momentum.

Inputs

Base Length (base_length, default 14) – Starting period for the first moving average; all others increment from here.

Source (source, default close) – Price series to feed into the moving averages.

How It Works

Trend Array Creation

An array of 26 floats is built, each element computed by choosing SMA, EMA, or WMA in rotation and applying it to source with periods base_length + index.

Color Assignment

A seven-color palette is cycled through, giving every third line the same hue for a smooth rainbow gradient.

Plotting & Filling

Each of the 26 lines is plotted in its assigned color.

Consecutive lines are filled with a semi-transparent aqua to accentuate the “vortex” effect.

Momentum Signals

On each bar, the script checks for crossovers between each pair of adjacent lines:

CrossUp increments when a faster line crosses above a slower one.

CrossDown increments when it crosses below.

A label at the current bar displays the total counts, giving a quick read on whether upward or downward momentum dominates.

Interpretation & Usage

Wide, uniform bands suggest a steady trend; tight, overlapping bands point to consolidation or indecision.

Rising “Up” count signals growing bullish momentum; rising “Down” count signals bearish pressure.

Use the vortex’s twists—where different-colored lines intersect—as early warnings of potential trend shifts.

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.