OPEN-SOURCE SCRIPT
3D Cube Projection - √3 Diagonal

3D Cube Projection - √3 Diagonal
OVERVIEW
This indicator implements Bradley F. Cowan's cube projection methodology from his "Four Dimensional Stock Market Structures & Cycles" work. It visualizes a 3D cube projected onto the 2D price-time chart, using the √3 (square root of 3) body diagonal as the primary analytical tool for identifying market structure and potential cycle termination points.
METHODOLOGY
The cube is constructed by selecting two pivot points (A and E) which form the body diagonal - the longest diagonal running through the cube's interior from one corner to the diagonally opposite corner. According to Cowan's geometric approach:
- Point A = Starting pivot (low or high)
- Point E = Ending pivot (opposite extreme)
- Body Diagonal (A→E) = √3 × cube side length
- Face Diagonal (A→C) = √2 × cube side length
The script calculates the cube dimensions by:
1. Measuring the total price range from A to E
2. Dividing by √3 to determine the cube side length in price
3. Distributing the time component across three equal segments
4. Projecting the 3D structure onto the 2D chart plane
FEATURES
✓ Interactive date selection for points A and E
✓ Automatic UPLEG/DOWNLEG detection
✓ All 8 cube vertices labeled (A-H)
✓ All 6 cube faces with independent color/opacity controls
✓ √3 body diagonal (red line by default)
✓ √2 face diagonal (orange line by default)
✓ Customizable cube lines, fills, and labels
✓ Information table showing key measurements
VISUAL CUSTOMIZATION
- Front & Back faces: Box fills for the two square faces
- Side faces: Left and right vertical faces
- Top & Bottom faces: Horizontal connecting faces
- Each group has independent color and opacity settings
- Label size and transparency fully adjustable
- Cube line styles (solid, dashed, dotted) for depth perception
IMPORTANT LIMITATIONS & DISCLOSURES
This indicator works within the inherent constraints of projecting 3D geometry onto a 2D price-time chart:
⚠️ VISUAL APPROXIMATION: This is a visual projection tool, not a mathematically perfect 3D cube. True 3D geometry cannot be accurately represented on a 2D plane without distortion.
⚠️ TIME DISTRIBUTION: The script divides the time axis into three equal segments (total bars ÷ 3) for practical visualization. This is an approximation that prioritizes visual coherence over strict geometric accuracy.
⚠️ UNIT SCALING: Price and time use different units (dollars vs. bars), making true isometric projection impossible. The cube appears proportional on screen but the dimensions are not directly comparable.
⚠️ 2D CONSTRAINT: We only have X (time) and Y (price) axes available. The Z-axis (depth) is simulated through visual projection techniques (line styles, shading).
INTENDED USE
This tool is designed for traders and analysts who study Bradley Cowan's geometric market analysis methods. It helps visualize:
- Market structure in geometric terms
- Potential support/resistance zones at cube edges
- Cycle timing relationships using √2 and √3 ratios
- Harmonic price-time relationships
The cube projection should be used as one component of a comprehensive analysis approach, combined with other technical tools and fundamental analysis.
MATHEMATICAL FOUNDATION
While the visual representation involves approximations, the core √3 relationship is mathematically sound:
- For any cube, the body diagonal = √3 × side length
- The face diagonal = √2 × side length
- These ratios are preserved in the price dimension calculations
HOW TO USE
1. Select your starting date (Point A) - typically a significant low or high
2. Select your ending date (Point E) - the opposite extreme pivot
3. The indicator automatically constructs the cube geometry
4. Analyze the cube edges, diagonals, and faces for market structure insights
5. Adjust colors and opacity to suit your chart aesthetic
TECHNICAL NOTES
- Works on all timeframes and instruments
- Best viewed on charts with sufficient historical data
- Cube updates in real-time as new bars form
- Range selection is marked with vertical lines and shading
- Calculator table shows Point A, Point E, side length, and bar measurements
ACKNOWLEDGMENT
This indicator is based on the geometric market analysis principles developed by Bradley F. Cowan. Users are encouraged to study Cowan's original works for deeper understanding of the theoretical framework.
DISCLAIMER
This indicator is for educational and analytical purposes only. It does not constitute financial advice. Past performance does not guarantee future results. Always conduct your own research and risk management before making trading decisions.
OVERVIEW
This indicator implements Bradley F. Cowan's cube projection methodology from his "Four Dimensional Stock Market Structures & Cycles" work. It visualizes a 3D cube projected onto the 2D price-time chart, using the √3 (square root of 3) body diagonal as the primary analytical tool for identifying market structure and potential cycle termination points.
METHODOLOGY
The cube is constructed by selecting two pivot points (A and E) which form the body diagonal - the longest diagonal running through the cube's interior from one corner to the diagonally opposite corner. According to Cowan's geometric approach:
- Point A = Starting pivot (low or high)
- Point E = Ending pivot (opposite extreme)
- Body Diagonal (A→E) = √3 × cube side length
- Face Diagonal (A→C) = √2 × cube side length
The script calculates the cube dimensions by:
1. Measuring the total price range from A to E
2. Dividing by √3 to determine the cube side length in price
3. Distributing the time component across three equal segments
4. Projecting the 3D structure onto the 2D chart plane
FEATURES
✓ Interactive date selection for points A and E
✓ Automatic UPLEG/DOWNLEG detection
✓ All 8 cube vertices labeled (A-H)
✓ All 6 cube faces with independent color/opacity controls
✓ √3 body diagonal (red line by default)
✓ √2 face diagonal (orange line by default)
✓ Customizable cube lines, fills, and labels
✓ Information table showing key measurements
VISUAL CUSTOMIZATION
- Front & Back faces: Box fills for the two square faces
- Side faces: Left and right vertical faces
- Top & Bottom faces: Horizontal connecting faces
- Each group has independent color and opacity settings
- Label size and transparency fully adjustable
- Cube line styles (solid, dashed, dotted) for depth perception
IMPORTANT LIMITATIONS & DISCLOSURES
This indicator works within the inherent constraints of projecting 3D geometry onto a 2D price-time chart:
⚠️ VISUAL APPROXIMATION: This is a visual projection tool, not a mathematically perfect 3D cube. True 3D geometry cannot be accurately represented on a 2D plane without distortion.
⚠️ TIME DISTRIBUTION: The script divides the time axis into three equal segments (total bars ÷ 3) for practical visualization. This is an approximation that prioritizes visual coherence over strict geometric accuracy.
⚠️ UNIT SCALING: Price and time use different units (dollars vs. bars), making true isometric projection impossible. The cube appears proportional on screen but the dimensions are not directly comparable.
⚠️ 2D CONSTRAINT: We only have X (time) and Y (price) axes available. The Z-axis (depth) is simulated through visual projection techniques (line styles, shading).
INTENDED USE
This tool is designed for traders and analysts who study Bradley Cowan's geometric market analysis methods. It helps visualize:
- Market structure in geometric terms
- Potential support/resistance zones at cube edges
- Cycle timing relationships using √2 and √3 ratios
- Harmonic price-time relationships
The cube projection should be used as one component of a comprehensive analysis approach, combined with other technical tools and fundamental analysis.
MATHEMATICAL FOUNDATION
While the visual representation involves approximations, the core √3 relationship is mathematically sound:
- For any cube, the body diagonal = √3 × side length
- The face diagonal = √2 × side length
- These ratios are preserved in the price dimension calculations
HOW TO USE
1. Select your starting date (Point A) - typically a significant low or high
2. Select your ending date (Point E) - the opposite extreme pivot
3. The indicator automatically constructs the cube geometry
4. Analyze the cube edges, diagonals, and faces for market structure insights
5. Adjust colors and opacity to suit your chart aesthetic
TECHNICAL NOTES
- Works on all timeframes and instruments
- Best viewed on charts with sufficient historical data
- Cube updates in real-time as new bars form
- Range selection is marked with vertical lines and shading
- Calculator table shows Point A, Point E, side length, and bar measurements
ACKNOWLEDGMENT
This indicator is based on the geometric market analysis principles developed by Bradley F. Cowan. Users are encouraged to study Cowan's original works for deeper understanding of the theoretical framework.
DISCLAIMER
This indicator is for educational and analytical purposes only. It does not constitute financial advice. Past performance does not guarantee future results. Always conduct your own research and risk management before making trading decisions.
Скрипт с открытым кодом
В истинном духе TradingView автор этого скрипта опубликовал его с открытым исходным кодом, чтобы трейдеры могли понять, как он работает, и проверить на практике. Вы можете воспользоваться им бесплатно, но повторное использование этого кода в публикации регулируется Правилами поведения.
Отказ от ответственности
Все виды контента, которые вы можете увидеть на TradingView, не являются финансовыми, инвестиционными, торговыми или любыми другими рекомендациями. Мы не предоставляем советы по покупке и продаже активов. Подробнее — в Условиях использования TradingView.
Скрипт с открытым кодом
В истинном духе TradingView автор этого скрипта опубликовал его с открытым исходным кодом, чтобы трейдеры могли понять, как он работает, и проверить на практике. Вы можете воспользоваться им бесплатно, но повторное использование этого кода в публикации регулируется Правилами поведения.
Отказ от ответственности
Все виды контента, которые вы можете увидеть на TradingView, не являются финансовыми, инвестиционными, торговыми или любыми другими рекомендациями. Мы не предоставляем советы по покупке и продаже активов. Подробнее — в Условиях использования TradingView.