OPEN-SOURCE SCRIPT

FibPulse144 [CHE]

154
FibPulse144 [CHE] — ADX-gated 13/21 crossover with 144-trend regime and closed-bar labels

Summary

FibPulse144 combines a fast moving-average crossover with a 144-period trend regime and an ADX strength gate. Signals are confirmed on closed bars only and drawn as labels on the price chart, while an ADX line in a separate pane provides context. Color gradients are derived from normalized ADX, so visual intensity reflects trend strength without changing the underlying logic. The approach reduces false flips during weak conditions and keeps entries aligned with the dominant trend.

Motivation: Why this design?

Traditional crossover signals can flip repeatedly during sideways phases and often trigger against the higher-time regime. By requiring alignment with a slower trend proxy and by gating entries through a rising ADX condition, FibPulse144 favors structurally cleaner transitions. Gradient coloring communicates strength visually, helping users temper aggressiveness without additional indicators.

What’s different vs. standard approaches?

Baseline: Classic dual-MA crossover with unconditional signals.
Architecture differences:

Two-bar regime confirmation against a 144-period trend average.
Pending-signal logic that waits for regime and optional ADX approval.
ADX strength gate using the prior reading relative to a user threshold and earlier value.
Gradient colors scaled by an ADX window with gamma controls.
Price-chart labels enforced via overlay on an otherwise pane-based indicator.
Practical effect: Fewer signals during weak or choppy conditions, labels that appear only after a bar closes, and color intensity that mirrors trend quality.

How it works (technical)

The script computes fast and slow moving averages using the selected method and lengths. A separate 144-length average defines the regime using a two-bar confirmation above or below it. Crossovers are observed on the previous bar to avoid intrabar ambiguity; once a prior crossover is detected, it is stored as pending. A pending long requires regime alignment and, if enabled, an ADX condition based on the previous reading being above the threshold and greater than an earlier reading. The state machine holds neutral, long, or short until an exit condition or ADX reset is met. ADX is normalized within a user window, scaled with gamma, and mapped to up and down color palettes to render gradients. Labels on the price panel are forced to overlay, while the ADX line and threshold guide remain in a separate pane.

Parameter Guide

Source — Input data for all calculations. Default: close. Tip: keep consistent with your chart.
MA Type — EMA or SMA. Default: EMA. EMA reacts faster; SMA is smoother.
Fast / Slow — Fast and slow lengths for crossover. Defaults: 13 and 21. Shorter reacts earlier; longer reduces noise.
Trend — Regime average length. Default: 144. Larger values stabilize regime; smaller values increase sensitivity.
Use 144 as trend filter — Enables regime gating. Default: true. Disable to allow raw crossovers.
Use ADX filter — Requires ADX strength. Default: true. Disable to allow signals regardless of strength.
ADX Len — DI and ADX smoothing length. Default: 14. Higher values smooth strength; lower values react faster.
ADX Thresh — Minimum strength for signals. Default: 25. Raise to reduce flips; lower to capture earlier moves.
Entry/Exit labels (price) — Price-panel labels on state changes. Default: true.
Signal labels in ADX pane — Small markers at the ADX value on entries. Default: true.
Label size — tiny, small, normal, large. Default: normal.
Enable barcolor — Optional candle tint by regime and gradient. Default: false.
Enable gradient — Turns on ADX-driven color blending. Default: true.
Window — Bars used to normalize ADX for colors. Default: 100; minimum: 5.
Gamma bars / Gamma plots — Nonlinear scaling for bar and line intensities. Default: 0.80; between 0.30 and 2.00.
Gradient transp (0–90) — Transparency for gradient colors. Default: 0.
MA fill transparency (0–100) — Fill opacity between fast and slow lines. Default: 65.
Palette colors (Up/Down) — Dark and neon endpoints for up and down gradients. Defaults as in the code.

Reading & Interpretation

Fast/Slow lines: When the fast line is above the slow line, the line and fill use the long palette; when below, the short palette is used.
Trend MA (144): Neutral gray line indicating the regime boundary.
Labels on price: “LONG” appears when the state turns long; “SHORT” when it turns short. Labels appear only after the bar closes and conditions are satisfied.
ADX pane: The ADX line shows current strength. The dotted threshold line is the user level for gating. Optional small markers indicate entries at the ADX value.
Bar colors (optional): Candle tint intensity reflects normalized ADX. Higher intensity implies stronger conditions.

Practical Workflows & Combinations

Trend following: Use long entries when fast crosses above slow and price has held above the trend average for two bars, with ADX above threshold. Mirror this for shorts below the trend average.
Exits and stops: Consider reducing exposure when price closes on the opposite side of the trend average for two consecutive bars or when ADX fades below the threshold if the ADX filter is enabled.
Structure confirmation: Combine with higher-timeframe structure such as swing highs and lows or a simple market structure overlay for confirmation.
Multi-asset/Multi-TF: Works across liquid assets. For lower timeframes, consider a slightly lower ADX threshold; for higher timeframes, maintain or raise the threshold to avoid unnecessary flips.

Behavior, Constraints & Performance

Repaint/confirmation: Signals are based on previous-bar crossovers and are confirmed on bar close. No higher-timeframe or security calls are used. Intrabar markers are not relied upon.
Resources: The script declares `max_bars_back` of 2000, uses no loops or arrays, and employs persistent variables for pending signals and state.
Known limits: Crossover systems can lag after sudden reversals. During tight ranges, disabling the ADX filter may increase flips; keeping it enabled may skip early transitions.

Sensible Defaults & Quick Tuning

Starting point: EMA, 13/21/144, ADX length 14, ADX threshold 25, gradients on, barcolor off.
Too many flips: Increase ADX threshold or length; increase trend length; consider SMA instead of EMA.
Too sluggish: Lower ADX threshold slightly; shorten fast and slow lengths; reduce the trend length.
Colors overpowering: Increase gradient transparency or reduce gamma values toward one.

What this indicator is—and isn’t

This is a visualization and signal layer that combines crossover, regime, and strength gating. It does not predict future movements, manage risk, or execute trades. Use it alongside clear structure, risk controls, and a defined position management plan.

Disclaimer

The content provided, including all code and materials, is strictly for educational and informational purposes only. It is not intended as, and should not be interpreted as, financial advice, a recommendation to buy or sell any financial instrument, or an offer of any financial product or service. All strategies, tools, and examples discussed are provided for illustrative purposes to demonstrate coding techniques and the functionality of Pine Script within a trading context.

Any results from strategies or tools provided are hypothetical, and past performance is not indicative of future results. Trading and investing involve high risk, including the potential loss of principal, and may not be suitable for all individuals. Before making any trading decisions, please consult with a qualified financial professional to understand the risks involved.

By using this script, you acknowledge and agree that any trading decisions are made solely at your discretion and risk.

Do not use this indicator on Heikin-Ashi, Renko, Kagi, Point-and-Figure, or Range charts, as these chart types can produce unrealistic results for signal markers and alerts.

Best regards and happy trading

Chervolino

免責事項

これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。