OPEN-SOURCE SCRIPT
Gann Square of 144 (Master Price & Time)

🔹 What this tool does
Draws a 144-unit square in price & time (0 → 144)
Plots all key horizontal & vertical levels:
0, 18, 36, 48, 54, 72, 90, 96, 108, 126, 144
Highlights the main 1/2 level (72) as thick midline
Marks 1/3 and 2/3 (48 & 96) as special harmonic levels
Draws internal diagonals (0–144, 144–0 and sub-squares)
Plots an 8-ray Gann fan from the 0-point (0 → 36 / 72 / 108 / 144 etc.)
Keeps price–time ratio consistent inside the box:
the 1×1 angle has a fixed slope = price_per_bar
The idea: once the square is calibrated to a major swing, you can study how price respects these angles and harmonic zones over time.
🔧 Inputs & how to set it up correctly
Choose your timeframe
Works best on Daily and Weekly charts.
Use one timeframe consistently when calibrating the square.
Start offset (bars back)
Start offset (bars back) shifts the whole square left/right.
Increase the value to move the square further into the past, decrease it to move it closer to the current bars.
Box width (bars)
Box width (bars) = how many bars the square spans horizontally.
Bigger value = projects the structure further into the future.
Example: 288 bars ≈ 2×144 units in time, 720 bars for longer-term projection, etc.
Bottom price
Bottom price is your 0-level in price.
Usually set this to a major swing low (cycle low, bear market low, important pivot).
The bottom-left corner of the square conceptually sits at:
(start_offset_bar, bottom_price)
Price per bar (slope 1×1) (if your version has this input)
This defines the slope of the 1×1 angle (main Gann angle).
Recommended way to set it:
Pick a major impulsive move from Swing Low → Swing High.
Measure:
Price range = High − Low
Number of bars between them.
Compute:
price_per_bar = price_range / number_of_bars
Use that as your 1×1 value in the input.
Now the main diagonal from 0 to 144 represents the true Gann 1×1 for that swing.
Important: The 1×1 angle is mathematically correct (price-per-bar), even if it does not always look like a perfect 45° line visually in TradingView due to chart scaling.
📖 How to read the Square of 144
Horizontal levels
0 = anchor price (bottom)
18, 36, 48, 54, 72, 90, 96, 108, 126, 144 = key price harmonics
72 (1/2) often acts as major support/resistance
48 & 96 (1/3 and 2/3) are strong “vibration” levels
Vertical levels
Same units but in time (bars).
When important pivots in price occur near these verticals, you get time–price confluence.
Midlines (1/2)
The thick horizontal and vertical lines at 72 mark the center of the square.
Crossings around these often signal important cycle turns.
1/3 & 2/3 zones (48–54 and 90–96)
These narrow bands are powerful reversal / decision zones.
Price often reacts strongly there or accelerates if they break.
Gann fan from 0-point
These rays represent major trends:
1×1 equivalent (main diagonal)
Faster & slower angles (e.g. 2×1, 1×2, etc depending on configuration)
If price breaks one fan angle cleanly, it often “falls” or “climbs” toward the next one.
🎯 Practical use cases
Project future support/resistance zones based on a major low.
See where price is in the square: early in the cycle (0–36), mid (around 72), or late (108–144).
Watch how price respects:
midlines (72),
1/3 and 2/3 bands (48–54, 90–96),
and the fan angles from 0.
Combine with your own price action / Fibonacci / trend tools – this is not a signal generator, but a time–price map.
⚠️ Notes & limitations
This tool is for educational & analytical purposes only.
It does not generate buy/sell signals.
Visual 45° angles in TradingView can change when you zoom or rescale the chart.
→ The script keeps the internal price-per-bar logic stable, even if the drawing looks steeper/flatter when zooming.
Always confirm zones with price action, volume, and higher timeframe context.
Draws a 144-unit square in price & time (0 → 144)
Plots all key horizontal & vertical levels:
0, 18, 36, 48, 54, 72, 90, 96, 108, 126, 144
Highlights the main 1/2 level (72) as thick midline
Marks 1/3 and 2/3 (48 & 96) as special harmonic levels
Draws internal diagonals (0–144, 144–0 and sub-squares)
Plots an 8-ray Gann fan from the 0-point (0 → 36 / 72 / 108 / 144 etc.)
Keeps price–time ratio consistent inside the box:
the 1×1 angle has a fixed slope = price_per_bar
The idea: once the square is calibrated to a major swing, you can study how price respects these angles and harmonic zones over time.
🔧 Inputs & how to set it up correctly
Choose your timeframe
Works best on Daily and Weekly charts.
Use one timeframe consistently when calibrating the square.
Start offset (bars back)
Start offset (bars back) shifts the whole square left/right.
Increase the value to move the square further into the past, decrease it to move it closer to the current bars.
Box width (bars)
Box width (bars) = how many bars the square spans horizontally.
Bigger value = projects the structure further into the future.
Example: 288 bars ≈ 2×144 units in time, 720 bars for longer-term projection, etc.
Bottom price
Bottom price is your 0-level in price.
Usually set this to a major swing low (cycle low, bear market low, important pivot).
The bottom-left corner of the square conceptually sits at:
(start_offset_bar, bottom_price)
Price per bar (slope 1×1) (if your version has this input)
This defines the slope of the 1×1 angle (main Gann angle).
Recommended way to set it:
Pick a major impulsive move from Swing Low → Swing High.
Measure:
Price range = High − Low
Number of bars between them.
Compute:
price_per_bar = price_range / number_of_bars
Use that as your 1×1 value in the input.
Now the main diagonal from 0 to 144 represents the true Gann 1×1 for that swing.
Important: The 1×1 angle is mathematically correct (price-per-bar), even if it does not always look like a perfect 45° line visually in TradingView due to chart scaling.
📖 How to read the Square of 144
Horizontal levels
0 = anchor price (bottom)
18, 36, 48, 54, 72, 90, 96, 108, 126, 144 = key price harmonics
72 (1/2) often acts as major support/resistance
48 & 96 (1/3 and 2/3) are strong “vibration” levels
Vertical levels
Same units but in time (bars).
When important pivots in price occur near these verticals, you get time–price confluence.
Midlines (1/2)
The thick horizontal and vertical lines at 72 mark the center of the square.
Crossings around these often signal important cycle turns.
1/3 & 2/3 zones (48–54 and 90–96)
These narrow bands are powerful reversal / decision zones.
Price often reacts strongly there or accelerates if they break.
Gann fan from 0-point
These rays represent major trends:
1×1 equivalent (main diagonal)
Faster & slower angles (e.g. 2×1, 1×2, etc depending on configuration)
If price breaks one fan angle cleanly, it often “falls” or “climbs” toward the next one.
🎯 Practical use cases
Project future support/resistance zones based on a major low.
See where price is in the square: early in the cycle (0–36), mid (around 72), or late (108–144).
Watch how price respects:
midlines (72),
1/3 and 2/3 bands (48–54, 90–96),
and the fan angles from 0.
Combine with your own price action / Fibonacci / trend tools – this is not a signal generator, but a time–price map.
⚠️ Notes & limitations
This tool is for educational & analytical purposes only.
It does not generate buy/sell signals.
Visual 45° angles in TradingView can change when you zoom or rescale the chart.
→ The script keeps the internal price-per-bar logic stable, even if the drawing looks steeper/flatter when zooming.
Always confirm zones with price action, volume, and higher timeframe context.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.