PROTECTED SOURCE SCRIPT
Updated

Price to Bar Ratio - Scale / Scales / Scaling

1 279
Price to Bar Ratio - Scaling

The Price to Bar Ratio - Scaling indicator for TradingView is designed for traders who utilize Gann-based techniques, Michael Jenkins methodologies, or geometric market analysis. It calculates the relationship between price movement and time (bars), providing a bar-to-price ratio that traders can use to align their charts with structured scaling methods.

Key Features:

• Geometry-Based Scaling – Designed for traders using market geometry, time/price balancing, or cycle analysis.
• Automatic Ratio Calculation – Computes a bar-to-price ratio based on price movement and time.
• Square & Rectangle Modes – Provides different scaling approaches to suit various analytical methods.
• Balanced Chart Structure – Helps maintain a proportional relationship between price and time.
• Customizable Inputs – Adjustable parameters for flexibility across different markets, assets, and timeframes.

How to Use:

1. Apply the Price to Bar Ratio - Scaling indicator to your TradingView chart.
2. Enable Magnet Mode in TradingView to help anchor points snap accurately to price levels.
3. Manually select your range using the four anchor points to define the area for calculation.
4. The indicator will generate a table displaying the calculated bar-to-price ratio.
5. Copy the recommended value from the table.
6. Open the chart settings in TradingView.
7. Locate the "Lock Price to Bar Ratio" input field.
8. Paste the copied ratio value into the input field and apply the changes.
9. Due to TradingView's limitations on the magnet option for anchor points, it is recommended to add a new instance of the indicator rather than dragging the anchor points to a new range. This prevents unwanted snapping behavior and ensures accurate recalculations.

Will be adding more formulas in the future.

Indicator in use:

snapshot

snapshot

snapshot

snapshot

snapshot
Release Notes
Custom colour option
Release Notes
Removed 4 anchor points and replaced with 2 anchor points that autofinds high/low
Release Notes
More ratios added:
  • √2
  • √3
  • Golden Ratio (φ)
  • √5
  • √6
  • √8
  • √9
  • 2^(1/12)
  • 3^(1/4)
  • 3/4
  • π

Release Notes
Minor error fixed
Release Notes
Small error fixed.
Release Notes
Minor edit on ratio
Release Notes
Additional ratios added
Release Notes
Feigenbaum added
Release Notes
Spatial Circle Levels

This update adds a new calculation based on circle geometry. When you select two anchors, the script now treats the swing range (High–Low) and its bar length as a diameter in a squared price–time space. From this, it computes a concentric circle whose vertical extremes define new Upper and Lower levels around the midpoint price.

A dedicated table in the bottom-right corner now displays:

  • Number of bars in the selection
  • Midpoint price (M)
  • Upper level (M + ρ)
  • Lower level (M − ρ)


These levels represent the top and bottom of the circle formed by the selected range and can be used as geometric anchor points for analysis.
Release Notes
Added a setting to turn the Spatial Circle table on/off in the indicator’s style options.
Release Notes
Ratio added

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.