OPEN-SOURCE SCRIPT
Güncellendi

Six Meridian Divine Swords [theUltimator5]

5 275
The Six Meridian Divine Sword is a legendary martial arts technique in the classic wuxia novel “Demi-Gods and Semi-Devils” (天龙八部) by Jin Yong (金庸). The technique uses powerful internal energy (qi) to shoot invisible sword-like energy beams from the six meridians of the hand. Each of the six fingers/meridians corresponds to a “sword,” giving six different sword energies.

The Six Meridian Divine Swords indicator is a compact “signal dashboard” that fuses six classic indicators (fingers)—MACD, KDJ, RSI, LWR (Williams %R), BBI, and MTM—into one pane. Each row is a traffic-light dot (green/bullish, red/bearish, gray/neutral). When all six align, the script draws a confirmation line (“All Bullish” or “All Bearish”). It’s designed for quick consensus reads across trend, momentum, and overbought/oversold conditions.

How to Read the Dashboard

The pane has 6 horizontal rows (explained in depth later):
  1. MACD
  2. KDJ
  3. RSI
  4. LWR (Larry Williams %R)
  5. BBI (Bull & Bear Index)
  6. MTM (Momentum)


Each tick in the row is a dot, with sentiment identified by a color.
  • Green = bullish condition met
  • Red = bearish condition met
  • Gray = inside a neutral band (filtering chop), shown when Use Neutral (Gray) Colors is ON


There are two lines that track the dots on the top or bottom of the pane.
  1. All Bullish Signal Line: appears only if all 6 are strongly bullish (default color = white)
  2. All Bearish Signal Line: appears only if all 6 are strongly bearish (default color = fuchsia)



The Six Meridians (Indicators) — What They Mean:

1) MACD — Trend & Momentum
What it is: A trend-following momentum indicator based on the relationship between two moving averages (typically 12-EMA and 26-EMA)
  • Logic used: Classic MACD line (EMA12−EMA26) vs its 9-EMA signal.
  • Bullish: MACD > Signal and |MACD−Signal| > Neutral Threshold
  • Bearish: MACD < Signal and |diff| > threshold
  • Neutral: |diff| ≤ threshold
  • Why: Small crosses can whipsaw. The neutral band ignores tiny separations to reduce noise.
  • Inputs: Fast/Slow/Signal lengths, Neutral Threshold.


2) KDJ — Stochastic with J-line boost
What it is: A variation of the stochastic oscillator popular in Chinese trading systems
  • Logic used: K = SMA(Stochastic, smooth), D = SMA(K, smooth), J = 3K − 2D.
  • Bullish: K > D and |K−D| > 2
  • Bearish: K < D and |K−D| > 2
  • Neutral: |K−D| ≤ 2
  • Why: K–D separation filters tiny wiggles; J offers an “extreme” early-warning context in the value label.
  • Inputs: Length, Smoothing.


3) RSI — Momentum balance (0–100)
What it is: A momentum oscillator measuring speed and magnitude of price changes (0–100)
  • Logic used: RSI(N).
  • Bullish: RSI > 50 + Neutral Zone
  • Bearish: RSI < 50 − Neutral Zone
  • Neutral: Between those bands
  • Why: Centerline/adaptive bands (around 50) give a directional bias without relying on fixed 70/30.
  • Inputs: Length, Neutral Zone (± around 50).


4) LWR (Williams %R) — Overbought/Oversold
What it is: An oscillator similar to stochastic, measuring how close the close is to the high-low range over N periods
  • Logic used: %R over N bars (0 to −100).
  • Bullish: %R > −50 + Neutral Zone
  • Bearish: %R < −50 − Neutral Zone
  • Neutral: Between those bands
  • Why: Uses a centered band around −50 instead of only −20/−80, making it act like a directional filter.
  • Inputs: Length, Neutral Zone (± around −50).


5) BBI (Bull & Bear Index) — Smoothed trend bias
What it is: A composite moving average, essentially the average of several different moving averages (often 3, 6, 12, 24 periods)
  • Logic used: Average of 4 SMAs (3/6/12/24 by default):
  • BBI = (MA3 + MA6 + MA12 + MA24) / 4
  • Bullish: Close > BBI and |Close−BBI| > 0.2% of BBI
  • Bearish: Close < BBI and |diff| > threshold
  • Neutral: |diff| ≤ threshold
  • Why: Multiple MAs blended together reduce single-MA whipsaw. A dynamic 0.2% band ignores tiny drift.
  • Inputs: 4 lengths (default 3/6/12/24). Threshold is auto-scaled at 0.2% of BBI.


6) MTM (Momentum) — Rate of change in price
What it is: A simple measure of rate of change
  • Logic used: MTM = Close − Close[N]
  • Bullish: MTM > 0.5% of Close
  • Bearish: MTM < −0.5% of Close
  • Neutral: |MTM| ≤ threshold
  • Why: A percent-based gate adapts across prices (e.g., $5 vs $500) and mutes insignificant moves.
  • Inputs: Length. Threshold auto-scaled to 0.5% of current Close.
  • Display & Inputs You Can Tweak


🎨 Use Neutral (Gray) Colors
ON (default): 3-color mode with clear “no-trade”/“weak” states.
OFF: classic binary (green/red) without neutral filtering.
Sürüm Notları
Fixed logic slightly to properly track the two lines based on the selection of whether the neutral (gray) dots are enabled.

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.