OPEN-SOURCE SCRIPT
Charter Execution Model [JOAT]

Charter Execution Model [JOAT]
Introduction
Charter Execution Model is an open-source Pine Script v6 strategy that integrates the broader JOAT framework into a single non-repainting execution model. It does not rely on one trigger alone. Instead, it uses a hierarchy of filters: regime eligibility first, liquidity bias second, structure confirmation third, and imbalance or displacement triggers fourth. Only when those layers align does the strategy consider taking a trade.
The goal of this strategy is not to present a magical black box. It is to model a disciplined decision stack. Many strategies fail because they treat every trigger the same way regardless of context. Charter Execution Model is built around the idea that context should do most of the work. If the market is not in a mature directional regime, if the liquidity ledger is not skewed appropriately, or if local structure does not agree, then a trigger by itself is not enough.
The script uses realistic execution controls directly in the declaration: fixed initial capital, percent-of-equity sizing, non-zero commission, non-zero slippage, no pyramiding, confirmed-bar evaluation, and orders processed on close. Those defaults are intended to make the backtest more responsible and easier to interpret than an overly aggressive model with idealized execution assumptions.
This strategy is best understood as a research framework. It can help traders study how context filters, imbalance triggers, continuation pressure, and ATR-based exits behave when combined inside one model. It is not a guarantee of future profitability, and it should be evaluated thoughtfully across symbols, regimes, and timeframes.

Core Concepts
1. Regime Eligibility Layer
The first gate determines whether the market is mature enough to even consider longs or shorts. It uses a directional midpoint and structural midpoint built from EMA and HMA references, then normalizes their spread by ATR and combines that with heat positioning inside the recent price range.
Pine Script®
That means the strategy does not allow triggers to fire in weak or undeveloped directional states. Context comes first.
2. Liquidity Bias Layer
Next, the strategy builds a rolling bin-based liquidity distribution and compares buy-side volume versus sell-side volume. A long context requires positive liquidity bias and price above the reference EMA. A short context requires negative liquidity bias and price below the reference EMA.
This adds an inventory-style filter so the strategy is not trading purely off price shape.
3. Structure Filter
Local structure is confirmed using pivot-derived reference points and a rolling swing lookback. Longs require price to hold above recent swing support and above the slow EMA. Shorts require the inverse.
This helps reduce cases where a regime and liquidity reading are still positive or negative, but local price structure has already started to degrade.
4. Trigger Stack
Once context aligns, the strategy allows three possible triggers: a confirmed imbalance gap, a displacement shift, or an optional continuation retest into the directional midpoint. This means the model can participate through both fresh displacement and controlled continuation.
Importantly, the trigger layer does not override the context layer. It only becomes active when the earlier filters already agree.
5. ATR-Based Exit Framework
Risk management is handled through ATR-sensitive invalidation and two fixed-R profit targets. When the regime is especially strong, an optional trailing rule tightens the stop using recent local price action.
This creates a trade structure with a defined stop, two staged exits, and optional adaptation in stronger conditions without relying on unrealistic all-in-all-out assumptions.
Features
Default Strategy Properties
Input Parameters
Regime:
Liquidity Filter:
Structure Filter:
Trigger Stack:
Risk Management:
How to Use This Strategy
Step 1: Evaluate Context Before Results
Begin by understanding what the strategy is trying to do rather than focusing immediately on performance output. It only wants to trade when a mature regime, directional liquidity bias, and confirming structure are all aligned. If that idea does not match your own process, the results will be hard to interpret.
Step 2: Study Trigger Type Distribution
Not all entries come from the same source. Some come from imbalance gaps, some from displacement shifts, and some from continuation pressure. Understanding which trigger type dominates on a given market can be more useful than simply checking net profit.
Step 3: Understand The Exit Framework
The model uses a staged exit approach. Half the position is managed toward the first target and half toward the second. A stop is always active, and strong-regime trailing can tighten the exit path further. Review this logic carefully before drawing conclusions from the backtest.
Step 4: Keep Expectations Realistic
The strategy includes commission, slippage, confirmed-bar logic, and no pyramiding, but that still does not make the backtest “real.” Results depend on the instrument, the timeframe, the data sample, and how well the context assumptions fit the market studied.
Step 5: Use It As A Research Framework
Charter Execution Model is best used as a framework for studying context-first execution logic. Adapt the filters, test the thresholds, and evaluate how the hierarchy behaves across different environments rather than assuming the defaults are universally optimal.
Strategy Limitations
Originality Statement
Charter Execution Model is original in the way it organizes multiple analytical layers into a disciplined execution hierarchy. It is not published as a simple indicator mashup strategy:
Disclaimer
This strategy is provided for educational and informational purposes only. It is not financial advice or a recommendation to buy or sell any financial instrument. Backtest results depend on assumptions, data quality, slippage, commission, bar resolution, and market conditions. Past performance does not guarantee future results. Always use independent judgment and proper risk management before using any strategy logic in live markets.
-Made with passion by jackofalltrades
Introduction
Charter Execution Model is an open-source Pine Script v6 strategy that integrates the broader JOAT framework into a single non-repainting execution model. It does not rely on one trigger alone. Instead, it uses a hierarchy of filters: regime eligibility first, liquidity bias second, structure confirmation third, and imbalance or displacement triggers fourth. Only when those layers align does the strategy consider taking a trade.
The goal of this strategy is not to present a magical black box. It is to model a disciplined decision stack. Many strategies fail because they treat every trigger the same way regardless of context. Charter Execution Model is built around the idea that context should do most of the work. If the market is not in a mature directional regime, if the liquidity ledger is not skewed appropriately, or if local structure does not agree, then a trigger by itself is not enough.
The script uses realistic execution controls directly in the declaration: fixed initial capital, percent-of-equity sizing, non-zero commission, non-zero slippage, no pyramiding, confirmed-bar evaluation, and orders processed on close. Those defaults are intended to make the backtest more responsible and easier to interpret than an overly aggressive model with idealized execution assumptions.
This strategy is best understood as a research framework. It can help traders study how context filters, imbalance triggers, continuation pressure, and ATR-based exits behave when combined inside one model. It is not a guarantee of future profitability, and it should be evaluated thoughtfully across symbols, regimes, and timeframes.
Core Concepts
1. Regime Eligibility Layer
The first gate determines whether the market is mature enough to even consider longs or shorts. It uses a directional midpoint and structural midpoint built from EMA and HMA references, then normalizes their spread by ATR and combines that with heat positioning inside the recent price range.
That means the strategy does not allow triggers to fire in weak or undeveloped directional states. Context comes first.
2. Liquidity Bias Layer
Next, the strategy builds a rolling bin-based liquidity distribution and compares buy-side volume versus sell-side volume. A long context requires positive liquidity bias and price above the reference EMA. A short context requires negative liquidity bias and price below the reference EMA.
This adds an inventory-style filter so the strategy is not trading purely off price shape.
3. Structure Filter
Local structure is confirmed using pivot-derived reference points and a rolling swing lookback. Longs require price to hold above recent swing support and above the slow EMA. Shorts require the inverse.
This helps reduce cases where a regime and liquidity reading are still positive or negative, but local price structure has already started to degrade.
4. Trigger Stack
Once context aligns, the strategy allows three possible triggers: a confirmed imbalance gap, a displacement shift, or an optional continuation retest into the directional midpoint. This means the model can participate through both fresh displacement and controlled continuation.
Importantly, the trigger layer does not override the context layer. It only becomes active when the earlier filters already agree.
5. ATR-Based Exit Framework
Risk management is handled through ATR-sensitive invalidation and two fixed-R profit targets. When the regime is especially strong, an optional trailing rule tightens the stop using recent local price action.
This creates a trade structure with a defined stop, two staged exits, and optional adaptation in stronger conditions without relying on unrealistic all-in-all-out assumptions.
Features
- Four-layer decision hierarchy: Regime, liquidity, structure, and trigger conditions must align before entry
- Confirmed-bar logic: Entries are evaluated only on confirmed bars to avoid repaint-style execution logic
- Non-zero execution costs: Includes realistic commission and slippage in the strategy declaration
- No pyramiding: Prevents stacking multiple positions in the same direction
- Partial profit framework: Uses two independent `strategy.exit()` orders to scale out at separate R multiples
- Optional continuation triggers: Allows pullback-style participation inside already qualified context
- Optional strong-regime trailing stop: Tightens exits when regime strength is elevated
- Dashboard summary: Displays regime, liquidity bias, pressure, trigger state, position state, stop settings, and current risk fields
- Clean visual overlay: Shows directional and structural mids with contextual fill directly on the chart
- Open-source research design: Lets users inspect and adapt the full context-to-execution hierarchy
Default Strategy Properties
- Initial capital: `100000` is used as the default starting capital in the script declaration
- Position sizing: Orders use `strategy.percent_of_equity` with a default quantity of `10`, meaning the strategy allocates 10% of equity per position by default
- Commission: Commission is modeled as `0.02%` per trade
- Slippage: Slippage is modeled as `2` ticks
- Pyramiding: Pyramiding is set to `0`, so the model does not stack entries in the same direction
- Order timing: `process_orders_on_close = true` and `calc_on_every_tick = false`, so the model evaluates and processes with confirmed-bar logic
Input Parameters
Regime:
- Fast Length: Controls the fast directional reference
- Slow Length: Controls the slow structural reference
- ATR Length: Sets the ATR normalization length
- Heat Window: Defines the range window for heat normalization
- Regime Strength Floor: Sets the minimum maturity threshold for context eligibility
Liquidity Filter:
- Liquidity Lookback: Sets the rolling history used for the liquidity model
- Liquidity Bins: Controls the liquidity distribution granularity
- Liquidity Bias Floor: Sets the minimum skew required before liquidity counts as directional
Structure Filter:
- Pivot Length: Sets pivot confirmation sensitivity
- Swing Lookback: Defines the rolling structural context window
Trigger Stack:
- Gap Sigma Filter: Sets the minimum imbalance displacement required for gap-style triggers
- Shift Momentum Length: Controls the raw momentum lookback
- Shift RSI Length: Controls the pressure RSI smoothing
- Displacement Floor: Sets the threshold for shift-style triggers
- Allow Continuation Triggers: Enables or disables pullback continuation entries
- Continuation Pressure Floor: Sets the minimum pressure level for continuation logic
Risk Management:
- Stop ATR Multiplier: Scales the ATR contribution to stop placement
- Target 1 R: Sets the first partial profit target
- Target 2 R: Sets the second partial profit target
- Trail In Strong Regime: Enables optional trailing behavior when regime strength is elevated
How to Use This Strategy
Step 1: Evaluate Context Before Results
Begin by understanding what the strategy is trying to do rather than focusing immediately on performance output. It only wants to trade when a mature regime, directional liquidity bias, and confirming structure are all aligned. If that idea does not match your own process, the results will be hard to interpret.
Step 2: Study Trigger Type Distribution
Not all entries come from the same source. Some come from imbalance gaps, some from displacement shifts, and some from continuation pressure. Understanding which trigger type dominates on a given market can be more useful than simply checking net profit.
Step 3: Understand The Exit Framework
The model uses a staged exit approach. Half the position is managed toward the first target and half toward the second. A stop is always active, and strong-regime trailing can tighten the exit path further. Review this logic carefully before drawing conclusions from the backtest.
Step 4: Keep Expectations Realistic
The strategy includes commission, slippage, confirmed-bar logic, and no pyramiding, but that still does not make the backtest “real.” Results depend on the instrument, the timeframe, the data sample, and how well the context assumptions fit the market studied.
Step 5: Use It As A Research Framework
Charter Execution Model is best used as a framework for studying context-first execution logic. Adapt the filters, test the thresholds, and evaluate how the hierarchy behaves across different environments rather than assuming the defaults are universally optimal.
Strategy Limitations
- The strategy relies on historical context filters that may adapt poorly to sudden regime shifts or atypical event-driven conditions
- Liquidity bias is based on bar-level directional volume attribution rather than true exchange order-flow data
- Processing orders on close simplifies execution and can differ materially from real fills on fast markets
- Backtest results are sensitive to parameter choices, timeframe selection, instrument behavior, and dataset length
Originality Statement
Charter Execution Model is original in the way it organizes multiple analytical layers into a disciplined execution hierarchy. It is not published as a simple indicator mashup strategy:
- It requires mature regime, directional liquidity bias, and local structure to align before any trigger is allowed to matter
- It supports multiple trigger archetypes inside the same context framework rather than treating one trigger as universally sufficient
- It combines staged exits, ATR-sensitive invalidation, and optional strong-regime trailing inside a consistent risk model
- It exposes its internal context state on-chart so users can study why the strategy is active or inactive at any point
Disclaimer
This strategy is provided for educational and informational purposes only. It is not financial advice or a recommendation to buy or sell any financial instrument. Backtest results depend on assumptions, data quality, slippage, commission, bar resolution, and market conditions. Past performance does not guarantee future results. Always use independent judgment and proper risk management before using any strategy logic in live markets.
-Made with passion by jackofalltrades
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
The AI Trading Ecosystem, Built to win trades 📈
Get Full Access 👇
jackofalltrades.vip 🌐
t.me/jackofalltradesvip 🃏
Get Full Access 👇
jackofalltrades.vip 🌐
t.me/jackofalltradesvip 🃏
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
The AI Trading Ecosystem, Built to win trades 📈
Get Full Access 👇
jackofalltrades.vip 🌐
t.me/jackofalltradesvip 🃏
Get Full Access 👇
jackofalltrades.vip 🌐
t.me/jackofalltradesvip 🃏
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.