Bullmania Money Line

ATR-based trend line and flip signals for TradingView (Pine v6). The indicator draws a “Money Line” that trails price and flips direction when price crosses it. Green dots mark bullish flips (trend turns up), red dots mark bearish flips (trend turns down).

This repo contains multiple versions; v4 is the stable baseline and v4+ adds optional filters, alerts, and per-timeframe profiles while preserving v4 defaults (off by default).

Files

  • Bullmania_Money_Line_v1.pine — Baseline behavior (original). Two inputs: ATR Period, Multiplier.
  • Bullmania_Money_Line_v2.pine — Historical variant.
  • Bullmania_Money_Line_v3.pine — Historical variant.
  • Bullmania_Money_Line_v4.pine — v1 + optional noise reduction (confirmation bars, ATR buffer). Tagged v4.0.0.
  • Bullmania_Money_Line_v4_plus.pine — v4-compatible but with optional filters and quality-of-life features (Pine v6).

How it works (all versions)

  • Money Line is derived from a mid-price (high + low) / 2 and ATR(atrPeriod) scaled by multiplier.
  • The line trails in the direction of the current trend and flips when price closes across it.
  • Plots:
    • Green line when trend is up, red line when trend is down.
    • Green dot below bar when trend flips up; red dot above bar when trend flips down.
    • Optional green/red fill between price and the line for quick context.

Inputs

Common inputs (v1v4):

  • ATR Period — ATR length in bars.
  • Multiplier — distance from source to the line in ATRs.

Additional inputs (v4 only):

  • Flip confirmation bars — require N consecutive closes beyond the Money Line to flip (default 1 = same as v1).
  • Flip buffer (×ATR) — require the cross to exceed the line by X × ATR to flip (default 0.0 = same as v1).

Defaults in v4 match v1, so you can upgrade without changing results and then enable the new knobs as needed.

v4+ extras (all optional; defaults preserve v4)

  • Calculation source: Chart or Heikin Ashi
  • Flip confirmation bars and Flip buffer (×ATR)
  • ADX/DMI gate (length, min ADX)
  • Higher timeframe confirmation (request.security with lookahead_off)
  • Session/time gating and cooldown bars after flip
  • EMA trend filter (e.g., 100200)
  • Anti-chop filters:
    • Choppiness Index (length and max allowed)
    • Retest-after-flip (window and tolerance in ATR)
    • Minimum candle body fraction
  • Visualization:
    • Gate flip circles with filters (optional)
    • Gated markers (triangles) for approved flips
    • Alerts/labels on bar close only
    • Price-to-line shading

Per-timeframe profiles (v4+)

Enable "Use per-timeframe profiles" to automatically switch parameters by chart timeframe:

  • Intraday (<60m)
  • 14h
  • 1D+

Each profile has its own confirm bars, ATR buffer, smoothing, ADX length/min, CHOP length/max, retest window/tolerance, min body fraction, and trend EMA. When profiles are OFF, the single global set of inputs is used.

Note

  • When profiles are ON, ALL relevant settings are per-profile: ATR Period, Multiplier, and all filter toggles/parameters (ADX, higher TF + its timeframe, session, cooldown, alerts on close, EMA trend filter enable and length, CHOP, Retest, Body filter). You always see exactly which profile is active by your chart timeframe.

How to use profiles

  1. In the indicator Inputs, enable "Use per-timeframe profiles".
  2. Change the chart timeframe; the active profile is selected automatically:
  • Intraday: under 60 minutes (e.g., 1, 3, 5, 15, 30, 45).
  • 14h: from 60 to 240 minutes inclusive (1h, 2h, 3h, 4h).
  • 1D+: daily and above (1D, 2D, 1W, 1M).
  1. Tune the controls in that profile group; they dont affect the other profiles.
  2. Optional: Save as default or save an Indicator Template in TradingView to reuse your setup.
  3. Turn profiles OFF to revert to one global set of inputs across all timeframes.

Tips

  • Global toggles like "Use ADX/DMI filter", "Use higher timeframe confirmation", "Use EMA trend filter", etc., apply to all profiles. The numeric thresholds/lengths inside each profile are per-profile.
  • For consistent behavior across TFs, start by scaling ATR Period with timeframe and then adjust Confirm bars and Buffer (×ATR) per profile.
  • Triangles, labels, and alerts follow the same gating and will only appear when all enabled filters pass.

Quick presets

Use these as starting points and adjust per symbol/volatility. Values are for Heikin Ashi unless noted.

  • 30m Conservative (quiet):

    • ATR Period: 8
    • Multiplier: 3.5
    • Flip confirmation bars: 2
    • Flip buffer (×ATR): 0.30
  • 30m Balanced:

    • ATR Period: 6
    • Multiplier: 3.2
    • Flip confirmation bars: 2
    • Flip buffer (×ATR): 0.25

Tuning cheat sheet

  • Too noisy (too many reversals):
    1. Increase confirmation bars (e.g., 2 → 3)
    2. Raise buffer by +0.05 to +0.10
    3. Widen Multiplier by +0.3 to +0.5 if needed
  • Too late / too few signals:
    1. Lower buffer by -0.05
    2. Reduce confirmation bars (3 → 2)
    3. Tighten Multiplier by -0.3 to -0.5

Timeframe scaling tip

If you want a similar time horizon across timeframes, pick a target window T in minutes (e.g., ~150 minutes). Then

ATR Period ≈ round(T / timeframe_minutes)

Keep Multiplier roughly stable and fine-tune by small increments; HA candles allow slightly tighter settings than regular candles.

How to use in TradingView

  1. Open TradingView → Pine Editor.
  2. New blank script.
  3. Copy the contents of the desired .pine file and paste.
  4. Save and “Add to chart”.
  5. Open Inputs to adjust parameters.

Changelog

  • v4+ — Pine v6 variant with optional ADX/MTF/session/cooldown, calc source toggle, EMA trend filter, anti-chop (CHOP, retest, min body), gated markers, and per-timeframe profiles.
  • v4.0.0 — Adds Flip confirmation bars and Flip buffer (×ATR). Defaults keep v1 behavior. Tag: v4.0.0.
  • v1 — Initial baseline.

Notes

  • v4 is designed to reduce whips without changing the core Money Line logic.
  • Optional future add-ons (can be toggled if requested):
    • RSI centerline or ADX filter to gate flips in weak trends.
    • Timeframe-adaptive ATR period (auto scales with chart TF).
    • Pivot-anchored dots (plot flip dot at prior swing high/low).

(If you want a LICENSE file added, tell me which license you prefer.)

Description
No description provided
Readme 182 KiB