PROTECTED SOURCE SCRIPT
已更新

Position Tool Pro

202
This advanced indicator is a professional upgrade and expansion of the default Position Tool on TradingView. Now you can visualize, calculate, and manage advanced scaling strategies directly on your TradingView chart – all with more features, flexibility, and automation.

Key Features:

Flexible Scaling Modes: Build your entries and exits with multiple levels using Progressive, Exponential, ATR/Volatility-Based, Fibonacci, or Manual Placement modes.

Entry & Exit Trajectories: Choose between Averaging In (scale between entry & stop) or Pyramiding (scale between entry & target) for both entries and exits.

Customizable Level Distribution: Fine-tune how much size you add at each level using fixed %, custom ratio (like 50:30:20), or even per-level percentages.

Real-Time Position Sizing: Enter your account size and risk %, and the tool automatically calculates size per entry/exit level and the full position.

Dynamic Stop Loss Options: Set fixed or ATR-based (volatility-adjusted) stops, including trailing options.

Visual Clarity: Each scale level is labeled with type, level number, price, %, allocation, and the distance mode used for full transparency.

Easy Level Placement: Set your entry, target, stop, and scale levels with simple chart clicks or in the settings panel.

Comprehensive P&L and RR Display: Instantly see your risk/reward ratio, potential profit/loss, and position summary in an overlay box.

Advanced Customization: Adjust label sizes for better readability, pick your own colors for each zone and label, and manage extension behavior.

Ideal For:

Systematic traders who want precise scaling

Turtle-style and trend-following strategies

Volatility-based position builders

Anyone who wants to visualize their full trade logic before execution
發行說明
Release Notes – Position Tool Pro v2.1

A major upgrade from the previous version. This release introduces advanced scaling modes, greater flexibility, improved labeling, and even more robust risk management—all built on trader feedback and practical needs.

What’s New and Improved:

– Exponential Distance Mode:
Added new “Exponential” mode for both entry and exit scaling, with configurable factor (1.1–3.0). Each gap is multiplied, enabling true geometric pyramiding. Works with both percentage and ATR-based spacing.

– Logarithmic Distance Mode:
Now supports natural logarithmic spacing, for decreasing gaps as levels approach the target—ideal for scaling out.

– Fibonacci Multiplier:
Entry and exit Fibonacci modes now support a custom multiplier (0.1–5.0, default 1.0) for tuning distance curves to suit any market.

– Distance Mode in Labels:
Every scale label now clearly shows which distance mode was used (e.g., [Progressive], [ATR], [Exponential]), removing any guesswork.

– Label Text Size Adjustable:
Label font size is now fully configurable in Style settings (tiny to huge, default normal).

– Auto-fill Support:
All calculated scale prices for entries and exits are displayed in the Data Window as “Calc Entry/Exit Level 1-5”, making it easy to copy values directly into Manual mode fields.

– Enhanced Exponential Mode:
Exponential mode can now be combined with ATR for volatility-adjusted geometric scaling.

– Progressive Increment Maximum Increased:
Max “Progressive Increment” is now 20% (up from 10%) for more flexibility in spacing.

– Default Settings Updated:
• Scaling Trajectory now defaults to “Pyramiding”
• Distance Mode now defaults to “ATR/Volatility Based”

– Lot Size Setting Removed:
The tool no longer requires a “Lot Size” input. Position size calculations now directly use your selected risk and account size, simplifying setup for all users.

– Commission Preset Selector:
Select your commission/maker fee from a grouped list of popular exchange presets, or enter any custom value. Preset selection auto-fills the right %.

– Other Improvements:
• Scaling logic is now more robust across all modes, with clearer input validation.
• Improved warning messages for misconfigured levels.
• P&L summary box and breakeven line now clearer and more responsive.
• Visuals: Colors, labels, and overlap logic further improved for all chart backgrounds.

Quick How-To:

1. Add the indicator to your chart.

2. Use the Settings (gear icon) to set entry, TP, and SL, or click on the chart.

3. All sizing, RR, and profit/loss are calculated instantly.

4. For advanced scaling, select the scaling mode, adjust parameters, and use Data Window outputs for precision.

Tip:
If you see unexpected behavior after an update, just remove and re-add the indicator for a clean state.

Feedback & Bugs:
Drop a comment or contact Robertsanktov on TradingView for suggestions or reports.


Note: Description might show up more than once above—just a hiccup in the initatial release procces (my first publication ever on TradingView).
發行說明
v2.2 – Commission & Entry Label Update
• Added commission fee presets for major exchanges
• Commission percentage now adjusts automatically based on the selected preset
• Entry label now displays all position information inline
• First scale level details are now included in the Entry label
• Commission fees are displayed on all relevant labels
• Updated default colors (white text, specific label backgrounds)
• Changed default Scale Label Size to “normal”
• Default ATR period is now 20
• Default Distance/Multiplier is now 2.0
• Maximum Distance/Multiplier increased to 50
• Fixed scale label display when first scale level equals entry
發行說明
Introducing Profit Milestone Tracking in v2.3! This update enhances your trading experience by adding R-based (risk multiple) profit monitoring, visual indicators, and a smart alert system. Built on the solid foundation of previous versions, these features integrate seamlessly without disrupting existing functionality.

New Features

R-Based Profit Milestone Tracking: Monitor key profit levels at 0.5R, 1R, 1.5R, 2R, 2.5R, and 3R (where R is the risk distance from entry to stop loss). Perfect for risk-reward analysis in live trades.
Visual Milestone Markers: Customizable labels, lines, or both to mark achieved milestones on the chart. Options include color, size, price display, and persistence after trade close.
Alert System for Milestones: Receive notifications when price first reaches a milestone (e.g., "Profit Milestone Reached: 1R at price X").
Fallback Alerts: Get warned if price drops below a previously hit milestone after achieving a higher one (e.g., "⚠️ Fallback Alert: Price dropped below 1R at Y"). Helps spot potential reversals.
Individual Controls: Toggle tracking, alerts, and fallbacks for each milestone independently via input settings.
Master Switch: Enable/disable the entire milestone system with one checkbox.

Improvements

Modular Design: Clean code structure for easier future expansions and maintenance.
Seamless Integration: Works flawlessly with existing features like entry/exit scaling, ATR stops, dynamic locking, and more. No conflicts with long/short positions or volatility-based modes.
Performance Optimizations: Reduced resource usage in scaling calculations and drawing updates for smoother chart performance.
This update empowers traders to stay on top of profit progression with minimal effort. If you encounter any issues or have feedback, drop a comment below!

Thank you for using Position Tool Pro! 🚀
發行說明
Position Tool Pro v2.4 Changelog

Overview:
This version introduces advanced alert management with cooldowns, fully customizable P&L summary box, adjustable label positions, and enhanced display of financial metrics for better trade visualization. The update focuses on improving user control, reducing alert noise, and providing more detailed information at a glance.

New Features:
  • Alert Cooldown Mechanism: Added configurable cooldown for fallback alerts to prevent spam. Users can set cooldown in bars or minutes via new settings in the "Alert System" group.
  • Alerts for Key Levels: Implemented optional alerts for main entry hit, take profit, stop loss, entry scale levels, and exit scale levels. Each alert type has individual toggles.
  • Customizable P&L Summary Box: The P&L box is now fully customizable with options for position (e.g., top_right, middle_left), text size (tiny to huge), and toggles for individual metrics (entry, target, stop, R:R, quantity, P&L, status, current R, position size).
  • Financial Amounts on Labels: Loss and profit amounts are now displayed next to stop and target labels (e.g., "Loss: -$500" or "Profit: +$1000").
  • Position Size in Quote Currency: Added display of position size in quote currency next to the entry label for quick reference.
  • Adjustable Label Offsets: New controls for horizontal offsets (in %) for entry, TP, and SL labels to fine-tune positioning and avoid overlaps.
  • Improved Formatting and Density: Enhanced label and box formatting for better readability and information density, including currency symbols and compact display.


Bug Fixes and Improvements:
  • Optimized alert firing logic with cooldown checks to reduce unnecessary notifications.
  • Improved bounds checking and warning messages for invalid level placements.
  • Enhanced dynamic level locking with better visual indicators (e.g., lock icons).
  • Minor performance optimizations in calculations and visual updates.


For full details, refer to the tooltips in the settings panel.
發行說明
v2.4.1 – Quick fix addressing a core logic issue. Script behaves as intended.
發行說明
[size=14]🆕 v3.0 – Total Flexibility Update: Labels, Position Sizing & Usability[/size]

A) Label Customization & Alignment Overhaul
  • Every component in the Entry, Stop-Loss, and Take-Profit labels is now fully customizable
  • Individual visibility toggles for each label element
  • Improved formatting and alignment for clean, compact display


B) Fixed Bar Offset Placement System
  • Labels no longer drift dynamically
  • User-defined bar offset applies consistently to all levels
  • Ensures predictable label placement across Entry, TP, SL, and Milestones


C) First Scale-Out Becomes True Exit Level
  • First exit level is no longer locked to Entry price
  • Can be freely positioned or tied to exit scaling logic
  • Treated as a real profit-taking level, not just a visual marker


D) New Position Sizing Framework – 4 Exclusive Modes
Choose between 4 mutually exclusive sizing methods via dropdown:

  • Risk % of Account
    → Account Size × Risk %
    → Divided by SL distance to get position size

  • Fixed Risk Amount
    → Use a fixed amount in account currency (e.g. $500)
    → Divided by SL distance
    → Ignores risk % input

  • Manual Position Size
    → Bypass all SL and risk logic
    → Directly enter fixed size (e.g. 0.5 BTC or 100 contracts)
    → SL/TP still show theoretical P&L

  • Leverage-Based Sizing
    → Account Size × Leverage = Max Notional
    → Size = Notional ÷ Entry Price
    → SL used only for P&L estimate
    → Ignores all risk inputs


✅ All modes are mutually exclusive
✅ Position sizing, labels, and P&L align to selected mode

🛠 Additional Refinements
  • Clean separation between % risk and fixed-risk logic
  • Accurate data flow through all labels, sizing, and milestone modules
  • All features from v2.4 retained and improved
發行說明
Position Tool Pro v3.1 – Changelog

🆕 New Features
  • Comprehensive Alert System:Main Alerts: Entry Hit, Take Profit Hit, Stop Loss Hit
    Entry Scale Levels: 1 through 5
    Exit Scale Levels: 1 through 5
    Milestone Levels: 0.5R, 1R, 1.5R, 2R, 2.5R, 3R
    Each alert has an enable toggle and respects cooldown settings (bar-based or time-based)
    Clean internal naming (e.g., triggerTP, trigger1R)
    All alerts appear in the TradingView alert dropdown
    Set up by right-clicking the chart → Add Alert → Select your desired trigger
  • R:R Auto-Target System:Enable toggle to activate
    Set your R:R Ratio (default: 2.0, range: 0.1–20)
    Optional override of manual TP
    Automatically calculates take profit based on stop loss × R:R
    Works with both fixed and ATR-based stops
  • P&L Summary Box Styling Options:Background color picker (default: black)
    Transparency slider (0–100%, default: 90%)
    Text color picker (default: white)
    Border toggle and custom color
    Row divider toggle (default: off)
  • Position Size Stabilization:
    • Qty and position size are now cached on entry
    • Stable display throughout trade lifecycle
    • Cache resets automatically when trade closes


🛠️ Improvements
  • Cleaner UI defaults for less clutter
  • Improved alert system integration and naming
  • Enhanced display of quote currency in P&L box when conversions are used


🐞 Fixes
  • Resolved quantity fluctuation during trades by implementing caching mechanism


🔧 Default Input Changes
  • Label offset increased from 5 to 10 bars
  • P&L summary box moved to bottom-right
  • Entry label now hides Qty, Size, Risk %, and RR by default
  • Stop Loss Type now defaults to ATR-based
  • Milestone tracking: Only 1R and 3R enabled by default
  • ATR Trailing Stop: Disabled by default
  • Milestone style: Set to "Both"


The v3.1 update delivers a powerful suite of new features, a streamlined default look, and rock-solid P&L stability. With alert triggers covering every key trade event, and full customization across visuals and logic, this version is built for serious execution and control.
發行說明
Quickfix
發行說明
🆕 New Features – Version 3.2

🎯 Milestone-Aligned Scaling (Major Upgrade)
  • Added an option to sync both Scaling In and Scaling Out levels with your selected R-multiple profit milestones (e.g. 0.5R, 1R, 1.5R, etc).
  • Ensures structured, risk-based execution across both entry and exit scaling.


Unified Positive R-Multiples
  • Entry scaling now uses the same positive R-levels as the exit milestones — no more negative logic.
  • Only enabled milestones are respected.
  • Example: If 1R and 3R are enabled, only those are used for scaling steps.


🧹 Simplified Alert System
  • Removed all built-in alert() calls, cooldowns, and fallback logic.
  • Fully replaced by clean alertcondition() triggers — more consistent and user-friendly.


Instant Trade Activation
  • Trades now activate instantly once price touches the entry level — even on the current candle.
  • Fixes the prior “pending” bug.
  • Works seamlessly across all timeframes.


📌 Improved Entry Label Logic
  • Show Position Size is now enabled by default.
  • Entry labels now show size per scale level when pyramiding is active.
  • Helps clarify allocated size at each entry step.


💱 Currency Conversion Removed
  • Removed all fiat conversion logic from the code.
  • All position and risk calculations are now native to the chart’s base currency — clean and consistent.


🧮 Universal Leverage Multiplier
  • Leverage (1x–125x) now applies to all position sizing modes:
    Risk % of AccountFixed Risk AmountManual Position Size
  • Clean integration without needing a separate sizing mode.


📈 Extended Milestone Levels
  • R-based milestones now continue beyond 3R:
    Added 3.5R, 4R, 4.5R and 5R milestone levels
  • Fully integrated in exit scaling and alert systems.
發行說明
🆕 New v3.2.1: Allocation Percentage
  • []You can now specify what percentage of your account to allocate to a specific trade (e.g., 50%).
    []All risk, P&L, and position size calculations are based on this allocation.
    []Visual feedback included via entry labels and P&L summary box.
    []Especially useful for seed positions, portfolio diversification, and segmented risk exposure.


🔁 Extended R-Multiple Milestones (up to 7R)
  • []New milestones added: 4R, 5R, 6R, and 7R[]Each level includes:
    • []Dedicated toggle
      []Visual markers
      []Full alert support
    []Perfect for tracking extended profit runs with precision.


🧹 Removed Deprecated Label Settings
  • []All legacy label settings have been removed from the inputs.
    []Interface is now cleaner and less confusing.
  • Reduces clutter and improves usability.


🌐 Updated Tooltip Language
  • []Commission % tooltip is now in English for global clarity.


⚙️ Default Stop Loss Type Changed
  • []Default SL mode is now Fixed Price instead of ATR-based.
    []Better suited for most manual or semi-automated trading approaches.
發行說明
v3.3 – Risk Logic, SL Fixes & Tier-Based Visuals

Simplified R:R Auto-Target Input
  • Replaced dual checkboxes with a single toggle: "Use R:R Auto-Target"
  • Placed the R:R ratio input inline beside the toggle
  • Removed the "Override Manual TP" option
  • New behavior: enabling the toggle auto-sets TP based on R:R target


Fixed SL Label Calculation
  • SL label now accurately reflects actual risk in dollars
  • Risk % mode: shows allocated balance × risk %
  • Fixed Risk mode: shows the fixed risk amount as set
  • Manual Size mode: calculates risk from position size × SL distance
  • P&L summary box now uses the same calculation logic


Default P&L Summary Status
  • Changed default of showPnlStatus from true to false


Tier-Based Allocation Highlighting
  • Introduced a 5-tier visual system based on allocation percentage
  • 0–10%: Light Probe – soft blue-gray – 🫧
  • 10–25%: Core Stance – sage green – 🧭
  • 25–50%: Tactical Thrust – golden amber – 🎯
  • 50–75%: Aggressive Push – burnt copper – 🔥
  • 75–100%: Critical Mass – deep crimson – ☢️
  • Allocation highlight color changes dynamically per tier
  • Each tier has its own customizable color input
  • Optional emoji badge shown via showAllocationEmoji toggle
  • Emoji appears only when input is filled and toggle is on
  • Emoji appears icon-only, next to allocation %, with no label
  • Color scheme reflects escalation from low to high risk
發行說明
v3.3.1 – Major Performance & Calculation Improvements

Core Optimization
  • Significantly reduced script execution time across all timeframes
  • Improved internal logic flow without altering user-facing behavior
  • Removed redundant calculations and streamlined conditional checks
  • Minimized computational load of milestone and scaling systems
  • All core calculations now run faster and more efficiently
發行說明
v3.3.2 Minor Bugfixes and Tweaks
發行說明
v3.3 Changelog

  • Added R-level milestones for +8R, +9R, and +10R
  • Strategic message system now spans from -1R to +10R
  • New default messages for high-profit zones:
    - 8R: "Extreme asymmetry. Trust the framework, not emotions."
    - 9R: "Outlier territory. System discipline is your only anchor."
    - 10R: "Peak performance zone. Success is structure, not luck."
  • Introduced default colors for +8R to +10R (all with 50% opacity)
  • Refined color coding for all R-levels to match psychological milestones
  • All R-message labels now default to 50% opacity for less distraction
  • Improved psychological guidance across all stages of trade development
  • Master toggle added to enable/disable all messages at once
  • Individual toggles, custom messages, and color controls for each level
  • Added text size and label position controls (top, center, bottom)
  • Optional persistence mode to keep messages visible after trade ends
  • Integrated seamlessly with existing milestone and alert system
發行說明
v4.0 — Changelog

New Features
  • Auto-ATR mode added: ATR multiplier (k) now auto-adjusts based on market cap tiers
  • Market cap segmentation expanded to 8 tiers from Mega-cap to Subnano-cap
  • Auto-k fallback: gracefully disables auto-ATR mode if CRYPTOCAP:<ticker> not available
  • Optional display of ATRx (ATR × k) and resolved cap tier in the P&L box
  • Preset-based scaling out now supported (e.g., 60:30:10 or 40:30:20:10 splits)


Enhancements
  • “R to % Target” logic corrected for accurate leverage-adjusted calculations
  • Monochrome and pastel palettes now render properly across all milestone levels
  • Improved error handling during SL/TP close to prevent runtime array.get() issues
  • New optional toggles for text color, ATRx display, and cap tier visibility


Fixes
  • Fixed crash caused by empty array access when closing trades with extended visuals
  • Resolved incorrect extension logic on entry/exit scale lines and milestone markers
  • Improved multiplier resolution from fixed-step to interpolated values for small caps
  • Prevented ticker string (e.g., CRYPTOCAP:BTC) from showing in cap tier display


Optional Configuration
  • User can override market cap source (default: CRYPTOCAP:<ticker>) manually
  • ATR multiplier ranges and cap segmentation are now fully adjustable in settings
  • All visual elements related to Auto-ATR and scaling logic can be toggled individually

發行說明
V4.1 New Features Added
  • ATR Reference Lines added as visual guides for volatility awareness
  • Three independent reference lines based on higher timeframe ATR:
    - Scalp Volatility Range (H1 ATR)
    - Swing Volatility Range (H4 ATR)
    - Position Volatility Range (D1 ATR)
  • Each line includes:
    - Toggle On/Off
    - Custom color and label
    - Adjustable ATR length and multiplier
  • Default multipliers:
    - Scalp: 1.5x
    - Swing: 2.0x
    - Position: 3.0x
  • Visual styling:
    - Line style: solid, dashed, dotted
    - Line width (1–5)
    - Label size: tiny, small, normal, large
    - Optional % distance from entry
  • Functionality:
    - Pulls ATR from correct timeframe
    - Auto-aligns based on long/short position
    - Extends to the right, matching position logic
  • Purpose:
    - Avoid placing stops inside volatile zones
    - See if your SL is unrealistically wide or tight
    - Improve risk context across scalp/swing/position styles
  • Note: purely visual; not linked to execution logic


New Anchor Lines Feature
  • New option to extend horizontal lines LEFT from:
    - Entry
    - Stop Loss
    - Target
  • Each anchor is toggleable and independently styled
  • Color options:
    - Auto-match level label
    - Or set custom colors
  • Extension modes:
    - Fixed number of bars (10–500)
    - Full extension to chart’s left edge
  • Line styling:
    - Style: solid, dashed, dotted
    - Width: 1–5
  • Auto-updates with:
    - ATR-based stop recalculations
    - Target scaling adjustments
    - Exit-based SL changes
    - R:R recalculations
  • Benefits:
    - Instantly compare levels to past structure
    - Spot support/resistance confluence
    - Avoid guessing or cursor hovering
    - Validate trade logic at a glance


Other Changes
  • R-messages are now disabled by default

發行說明
V4.1.1 Minor Bugfixes & Tweaks
發行說明
Changelog v4.2: Anchor Lines Enhancement
  • Expanded the Anchor Lines (Historical References) feature to support:
    • ATR Reference Lines
    • Scaling Level Lines

  • ATR Reference Anchor Lines
    • New toggle: enableAtrRefAnchors
    • Draws ATR lines (Scalp, Swing, Position) backward from entry
    • Option to use ATR zone colors or custom colors

  • Scaling Level Anchor Lines
    • New toggle: enableScaleAnchors
    • Draws all scale entry/exit levels backward from entry
    • Separate color options for entry and exit anchor lines

  • Shared Behavior
    • All anchor lines follow same extend mode (fixed bars or full history)
    • Inherit line width, style, and cleanup logic
    • Auto-update dynamically with trade or scaling changes


🎭 Quote Style System
  • Added new Quote Style system to enrich R-messages with personality
  • New dropdown: Quote Style, with 5 presets:
    • 🪨 Stoic — Philosophical and grounded
    • 🌙 Poetic — Metaphorical and artistic
    • 🛡 Tactical — Practical trading logic
    • 🔥 Confrontational — Bold and challenging
    • 🧊 Dry — Minimalist and direct

  • Behavior:
    • Displays predefined quote at 0.5R, 1.0R, … up to 3.0R
    • Only the latest milestone message appears at a time
    • If preset selected, overrides custom R-message inputs
    • "Custom" option still allows personal messages

  • Fully integrated with existing R-message logic:
    • Respects label position, styling, and quote timing
    • Easy to switch styles mid-trade for psychological alignment

發行說明
V4.2.1 Optimizations, Bugfixes & Tweaks
發行說明
v4.2.2 — ATR Reference Lines: Price Display Added
  • Added option to show price labels on ATR-based volatility reference lines
  • Price display is enabled by default for all reference levels
  • Improved label clarity for visual alignment and quick interpretation
  • Internal logic unaffected — purely a display enhancement


Other Changes
  • Removed non-functional decorative features for leaner performance
  • Minor code cleanup and consolidation of unused elements

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。