OPEN-SOURCE SCRIPT

Crossframe Bias Ledger [JOAT]

902
Crossframe Bias Ledger [JOAT]

Introduction

Crossframe Bias Ledger is an open-source non-repainting higher-timeframe bias overlay built to align an intermediate timeframe, a major timeframe, and the local chart into one directional map. It uses safely delayed `request.security()` calls, crossframe basis clouds, premium/discount rails, alignment boxes, execution-state labels, and an optional TP/SL scaffold on fresh confirmed alignment shifts.

The script solves directional context across timeframes. Many local signals fail because they are taken against dominant higher-timeframe structure. Crossframe Bias Ledger keeps the user anchored to higher-timeframe alignment while still making the output actionable on the trading timeframe.

snapshot


Core Concepts

1. Safe Higher-Timeframe Requests

All higher-timeframe values are retrieved using delayed indexing so incomplete higher-timeframe bars do not leak into the current chart:

Pine Script®
idxHigher = barstate.isrealtime ? 1 : 0 idxCurrent = barstate.isrealtime ? 0 : 1


2. Primary and Secondary Trend Stacks

Fast, slow, and signal EMAs are retrieved from two higher timeframes and converted into directional scores.

3. Premium / Discount Map

The two higher-timeframe bases define a premium/discount zone. Price trading above the upper rail is treated as premium. Price trading below the lower rail is treated as discount. Price between them is treated as rebalancing.

4. Fresh Alignment Shifts

When the crossframe score crosses into confirmed bullish or bearish alignment, the script marks this as a fresh state transition and can build an informational TP/SL ladder.

5. Rebalance vs Continuation Logic

The script distinguishes rebalancing entries inside the premium/discount box from continuation conditions outside it.

Features

  • Non-repainting crossframe logic: Uses safely delayed higher-timeframe requests
  • Dual cloud system: Primary and secondary timeframe clouds on the chart
  • Premium / discount rails: Crossframe valuation map between the two HTF bases
  • Bias box: Forward execution window for the current crossframe state
  • Fresh alignment detection: Distinguishes a new bull/bear shift from an already active state
  • Continuation and rebalance readouts: Shows whether price is extending or rebalancing
  • Optional TP/SL ladder: Informational scaffold for new alignment shifts
  • Top-right dashboard: Displays state, signal, timeframe bias, location, execution mode, basis, and score


How to Use This Indicator

Step 1: Read whether the state is aligned up, aligned down, or mixed.

Step 2: Check if price is trading in premium, discount, or rebalance territory.

Step 3: Use fresh shifts to identify new state transitions. Use continuation and rebalance readings to differentiate execution style.

Step 4: Keep local entries aligned with the dominant crossframe bias whenever possible.

Indicator Limitations

  • Higher-timeframe logic is intentionally delayed for safety, so it will not react as quickly as unstable lookahead-based implementations
  • Premium/discount interpretation depends on the chosen timeframes
  • Mixed states are intentional and may persist when higher timeframes disagree
  • The TP/SL ladder is informational and does not place trades


Originality Statement

Crossframe Bias Ledger is original in the way it combines safe higher-timeframe delay logic, dual-basis premium/discount mapping, fresh alignment shifts, and execution-state scaffolding into one open-source overlay. The script is intended to provide a reusable top-down directional framework rather than a generic MTF trend line.

Disclaimer

This indicator is provided for educational and informational purposes only. It is not financial advice. Higher-timeframe alignment may still fail, reverse, or become mixed as new data forms. Always use independent analysis and risk management.

-Made with passion by jackofalltrades

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.