OPEN-SOURCE SCRIPT
[uPaSKaL] Trading Notebook

Trading Notebook — Structured Trade Planning Dashboard
Trading Notebook is a compact chart-based planning panel designed to help discretionary traders keep their trade thesis, checklist, key levels, execution status, and invalidation logic visible directly on the chart.
This script does not generate automatic buy or sell signals. Its purpose is to structure the decision-making process before execution, reduce emotional entries, and keep the trader aligned with a predefined plan.
The compact header displays the active bias, decision state, and weighted setup score at a glance.
Main Purpose
Most discretionary mistakes happen when the trader enters before confirmation, forgets the original invalidation level, changes the plan after price moves, or mixes multiple scenarios without a clear execution framework.
Trading Notebook solves this by turning the trade idea into a visible checklist-based dashboard.
Panel Modules
The panel is divided into six practical modules:
Bias & Decision Framework
Each profile can be assigned one of four bias states:
The execution state can be managed through the Decision field:
This separates analysis from execution and helps prevent impulsive decision-making.
Multi-Profile System
Trading Notebook supports up to 5 independent profiles.
Each profile includes:
Only enabled profiles are used in Auto Symbol matching.
The Notes field is stored inside the profile settings, but it is not displayed on the current compact panel layout.
Profile Selection
The default profile-selection mode is Auto Symbol.
The script supports two profile-selection modes:
Auto Symbol matches profiles by ticker root. For example, `XAUUSD` can match symbols such as `FOREXCOM:XAUUSD`, `OANDA:XAUUSD`, and other broker versions of the same root ticker.
The matching logic also supports common perpetual suffixes such as `BTCUSDT.P`.
If no symbol match is found, the script can either show a no-match message or use the selected default profile, depending on the user setting.
Checklist & Score Logic
Each profile includes a custom checklist with up to 10 user-defined conditions.
Checklist items are entered in a multiline text area, with one condition per line. Each condition is then confirmed manually through its corresponding Done toggle.
Every checklist item has:
The final score is calculated from completed checklist weight relative to total checklist weight and is displayed from 0 to 100.
Score labels:
This allows more important conditions to carry more influence than secondary confirmations.
Example checklist items:
The checklist header displays the completed item count, total item count, weighted score percentage, and a compact progress bar.
Example:
Context Module
The Context module is designed for the core market narrative.
It can include:
The compact panel displays up to 4 context lines. Longer text is truncated to keep the panel clean and usable.
Example:
Level Management
Each profile supports up to 5 active levels.
Every level includes:
Available level types:
Levels can be drawn directly on the chart with customizable labels, line style, and extension mode.
Level settings include:
This allows the notebook to function as both a planning panel and a level-management tool.
Trade Plan Module
The Plan section stores the practical execution model.
It can include:
Example:
The compact panel displays the first two plan lines. Longer plans can still be stored in the profile settings.
Invalidation Module
The Invalidation module is used to write the condition that invalidates the current trade idea.
Examples:
Important distinction:
The Invalidation text module is for planning only. It does not trigger alerts by itself.
Invalidation Alert triggers only when price crosses an active chart level whose Type is set to Invalidation.
Alert System
The script includes optional alert logic for monitoring important setup events.
Available alerts:
Score and decision alerts use standard alert conditions.
Level Cross and Invalidation Cross alerts use dynamic `alert()` messages.
For level-based alerts, create a chart alert using:
This allows the alert message to include the active symbol, timeframe, profile number, crossed level name, and crossed price.
Panel Customization
The panel can be customized through:
Available panel sizes:
Available panel positions:
If the checklist contains more items than the selected visible row limit, the panel shows how many items are hidden.
Example Workflow
Example Use Case
A trader watching XAUUSD may define:
This prevents premature execution because the unfinished checklist conditions, active levels, plan, and invalidation remain visible on the chart.
What This Script Is Not
Trading Notebook is not an automatic trading system.
It does not predict price direction.
It does not create mechanical buy or sell signals.
It does not execute trades.
It does not guarantee that a high score will produce a profitable trade.
The score is a process-control score, not a probability model.
The quality of the output depends on the quality of the trader’s own framework, checklist, and level selection.
Best Use Cases
This tool is suitable for:
Limitations
All notebook content is entered through TradingView inputs.
The script does not support live typing directly on the chart.
The script does not automatically save new information outside TradingView’s saved indicator settings.
The Notes field is available in the profile settings, but it is not displayed on the current compact panel.
The checklist score depends entirely on the user-defined framework.
A high score means the user’s own checklist is mostly complete. It does not mean the market has a statistically proven probability of success.
Conclusion
Trading Notebook is designed to bring structure, discipline, and clarity into discretionary trading.
It keeps the full trade idea visible on the chart:
A valid trade idea should have a clear thesis, confirmed conditions, mapped levels, defined risk, and a written invalidation point before execution.
This script is built to keep that process visible, organized, and repeatable.
Trading Notebook is a compact chart-based planning panel designed to help discretionary traders keep their trade thesis, checklist, key levels, execution status, and invalidation logic visible directly on the chart.
This script does not generate automatic buy or sell signals. Its purpose is to structure the decision-making process before execution, reduce emotional entries, and keep the trader aligned with a predefined plan.
The compact header displays the active bias, decision state, and weighted setup score at a glance.
Main Purpose
Most discretionary mistakes happen when the trader enters before confirmation, forgets the original invalidation level, changes the plan after price moves, or mixes multiple scenarios without a clear execution framework.
Trading Notebook solves this by turning the trade idea into a visible checklist-based dashboard.
- Define the active market bias.
- Write the current market context.
- Track confirmation conditions.
- Score the setup using weighted checklist logic.
- Display important levels directly on the chart.
- Store the trade plan and invalidation condition.
- Monitor the setup through optional alerts.
Panel Modules
The panel is divided into six practical modules:
- Context — stores the active market thesis, structure, phase, and main scenario.
- Checklist — tracks whether the required setup conditions are confirmed.
- Levels — displays important levels from the active profile.
- Decision — shows the current execution state.
- Plan — stores the trade plan, entry logic, stop logic, and targets.
- Invalidation — stores the condition that makes the current idea invalid.
Bias & Decision Framework
Each profile can be assigned one of four bias states:
- Bullish
- Bearish
- Neutral
- Waiting
The execution state can be managed through the Decision field:
- No Trade — no valid setup.
- Watching — setup is developing.
- Ready — execution conditions are nearly complete.
- Triggered — entry trigger has occurred.
- In Trade — trade is active.
- Invalidated — the idea is no longer valid.
- Completed — the setup has finished.
This separates analysis from execution and helps prevent impulsive decision-making.
Multi-Profile System
Trading Notebook supports up to 5 independent profiles.
Each profile includes:
- Enable / disable switch
- Symbol
- Title
- Bias
- Decision state
- Context text area
- Checklist text area
- Checklist Done toggles
- Checklist weights
- Notes field
- Trade plan text area
- Invalidation text area
- Five custom price levels
Only enabled profiles are used in Auto Symbol matching.
The Notes field is stored inside the profile settings, but it is not displayed on the current compact panel layout.
Profile Selection
The default profile-selection mode is Auto Symbol.
The script supports two profile-selection modes:
- Auto Symbol — automatically selects the enabled profile that matches the current chart symbol.
- Manual — allows the user to manually select the active profile.
Auto Symbol matches profiles by ticker root. For example, `XAUUSD` can match symbols such as `FOREXCOM:XAUUSD`, `OANDA:XAUUSD`, and other broker versions of the same root ticker.
The matching logic also supports common perpetual suffixes such as `BTCUSDT.P`.
If no symbol match is found, the script can either show a no-match message or use the selected default profile, depending on the user setting.
Checklist & Score Logic
Each profile includes a custom checklist with up to 10 user-defined conditions.
Checklist items are entered in a multiline text area, with one condition per line. Each condition is then confirmed manually through its corresponding Done toggle.
Every checklist item has:
- A Done checkbox
- A custom weight from 0 to 10
The final score is calculated from completed checklist weight relative to total checklist weight and is displayed from 0 to 100.
Score labels:
- Weak Setup — below 40
- Developing — 40 to 69
- Valid Setup — 70 to 89
- A+ Setup — 90 and above
This allows more important conditions to carry more influence than secondary confirmations.
Example checklist items:
- HTF bias is clear
- Liquidity pool identified
- Meaningful liquidity swept
- Displacement confirmed
- FVG / imbalance exists
- MSS / BOS confirmed
- OTE zone reached
- Volume / CVD confirms
- Risk is defined
- Invalidation is protected
The checklist header displays the completed item count, total item count, weighted score percentage, and a compact progress bar.
Example:
- CHECKLIST 6/10 · 60%
Context Module
The Context module is designed for the core market narrative.
It can include:
- HTF bias
- Current structure
- Market phase
- Primary scenario
- Liquidity condition
- Confirmation requirement
The compact panel displays up to 4 context lines. Longer text is truncated to keep the panel clean and usable.
Example:
- HTF Bias: Bearish
- Structure: Range compression
- Market Phase: Waiting for sweep
- Main Scenario: Short from premium
Level Management
Each profile supports up to 5 active levels.
Every level includes:
- Enable / disable switch
- Custom name
- Price
- Level type
Available level types:
- Liquidity
- Support
- Resistance
- OTE
- FVG
- OB
- Breaker
- Invalidation
- Target
- Custom
Levels can be drawn directly on the chart with customizable labels, line style, and extension mode.
Level settings include:
- Show or hide active profile levels
- Show or hide level labels
- Tiny, Small, or Normal label size
- None, Right, or Both extension
- Solid, Dashed, or Dotted line style
This allows the notebook to function as both a planning panel and a level-management tool.
Trade Plan Module
The Plan section stores the practical execution model.
It can include:
- Entry condition
- Entry zone
- Stop-loss logic
- Target levels
- Trigger requirement
- Confirmation rule
Example:
- Short after liquidity sweep + MSS
- Entry: 4,305 - 4,325 | SL: 4,340 | TP1: 4,280 | TP2: 4,250
The compact panel displays the first two plan lines. Longer plans can still be stored in the profile settings.
Invalidation Module
The Invalidation module is used to write the condition that invalidates the current trade idea.
Examples:
- Above 4,340.0
- Below 58,500.0
- Close below demand zone
- Break above protected high
- Failure to hold OTE
Important distinction:
The Invalidation text module is for planning only. It does not trigger alerts by itself.
Invalidation Alert triggers only when price crosses an active chart level whose Type is set to Invalidation.
Alert System
The script includes optional alert logic for monitoring important setup events.
Available alerts:
- Score Alert — triggers when the setup score reaches the selected threshold.
- Decision Alert — triggers when the decision state becomes Ready or Triggered.
- Level Cross Alert — triggers when price crosses an active level.
- Invalidation Alert — triggers when price crosses an active chart level whose Type is set to Invalidation.
Score and decision alerts use standard alert conditions.
Level Cross and Invalidation Cross alerts use dynamic `alert()` messages.
For level-based alerts, create a chart alert using:
- Any alert() function call
This allows the alert message to include the active symbol, timeframe, profile number, crossed level name, and crossed price.
Panel Customization
The panel can be customized through:
- Show Panel on / off
- Panel position
- Panel size
- Dark, Light, or Transparent theme
- Maximum visible checklist rows
- Use Icons on / off
Available panel sizes:
- Tiny
- Small
- Normal
Available panel positions:
- Top Right
- Top Left
- Bottom Right
- Bottom Left
- Top Center
- Bottom Center
- Middle Right
- Middle Left
If the checklist contains more items than the selected visible row limit, the panel shows how many items are hidden.
Example Workflow
- Create or enable a profile for the active market.
- Use Auto Symbol or Manual profile selection.
- Define the current market context.
- Set the directional bias.
- Write the checklist conditions, one condition per line.
- Assign higher weights to the most important confirmations.
- Mark conditions as Done only after confirmation.
- Map liquidity, support, resistance, OTE, FVG, OB, target, or invalidation levels.
- Write the trade plan before execution.
- Define invalidation clearly.
- Update the Decision state as the setup develops.
Example Use Case
A trader watching XAUUSD may define:
- Bias: Bearish
- Decision: Watching
- Context: HTF bearish, range compression, waiting for liquidity sweep
- Checklist: liquidity identified, displacement required, MSS/BOS needed, OTE not reached yet
- Levels: liquidity high, OTE, FVG, POI, invalidation
- Plan: short only after sweep + MSS
- Invalidation: above protected high
This prevents premature execution because the unfinished checklist conditions, active levels, plan, and invalidation remain visible on the chart.
What This Script Is Not
Trading Notebook is not an automatic trading system.
It does not predict price direction.
It does not create mechanical buy or sell signals.
It does not execute trades.
It does not guarantee that a high score will produce a profitable trade.
The score is a process-control score, not a probability model.
The quality of the output depends on the quality of the trader’s own framework, checklist, and level selection.
Best Use Cases
This tool is suitable for:
- Discretionary traders
- SMC / ICT traders
- Liquidity-based traders
- Supply and demand traders
- Price-action traders
- Intraday traders
- Swing traders
- Multi-symbol traders
- Traders who need a repeatable pre-entry checklist
Limitations
All notebook content is entered through TradingView inputs.
The script does not support live typing directly on the chart.
The script does not automatically save new information outside TradingView’s saved indicator settings.
The Notes field is available in the profile settings, but it is not displayed on the current compact panel.
The checklist score depends entirely on the user-defined framework.
A high score means the user’s own checklist is mostly complete. It does not mean the market has a statistically proven probability of success.
Conclusion
Trading Notebook is designed to bring structure, discipline, and clarity into discretionary trading.
It keeps the full trade idea visible on the chart:
- Bias
- Decision state
- Weighted score
- Context
- Checklist
- Levels
- Plan
- Invalidation
A valid trade idea should have a clear thesis, confirmed conditions, mapped levels, defined risk, and a written invalidation point before execution.
This script is built to keep that process visible, organized, and repeatable.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.