PROTECTED SOURCE SCRIPT
Gann 999

//version=5
indicator("Gann Square of Nine HA Pivot Levels", overlay=true)
// ===== USER INPUT =====
haPivot = input.float(3339.33, "HA Pivot")
degreeStep = input.int(45, "Degree Step (Default 45°)")
// ===== CALCULATIONS =====
root = math.sqrt(haPivot)
step = degreeStep / 360.0
// Function to calculate level
gannLevel(multiplier) =>
math.pow(root + (step * multiplier), 2)
// R levels
R1 = gannLevel(1)
R2 = gannLevel(2)
R3 = gannLevel(3)
R4 = gannLevel(4)
R5 = gannLevel(5)
R6 = gannLevel(6)
R7 = gannLevel(7)
R8 = gannLevel(8)
R9 = gannLevel(9)
// S levels
S1 = math.pow(root - (step * 1), 2)
S2 = math.pow(root - (step * 2), 2)
S3 = math.pow(root - (step * 3), 2)
S4 = math.pow(root - (step * 4), 2)
S5 = math.pow(root - (step * 5), 2)
S6 = math.pow(root - (step * 6), 2)
S7 = math.pow(root - (step * 7), 2)
S8 = math.pow(root - (step * 8), 2)
S9 = math.pow(root - (step * 9), 2)
// ===== PLOTTING =====
plot(haPivot, "HA Pivot", color=color.yellow, linewidth=2)
plot(R1, "R1", color=color.green)
plot(R2, "R2", color=color.green)
plot(R3, "R3", color=color.green)
plot(R4, "R4", color=color.green)
plot(R5, "R5", color=color.green)
plot(R6, "R6", color=color.green)
plot(R7, "R7", color=color.green)
plot(R8, "R8", color=color.green)
plot(R9, "R9", color=color.green)
plot(S1, "S1", color=color.red)
plot(S2, "S2", color=color.red)
plot(S3, "S3", color=color.red)
plot(S4, "S4", color=color.red)
plot(S5, "S5", color=color.red)
plot(S6, "S6", color=color.red)
plot(S7, "S7", color=color.red)
plot(S8, "S8", color=color.red)
plot(S9, "S9", color=color.red)
// ===== LABELS (last bar only) =====
if bar_index == last_bar_index
label.new(bar_index, R9, "R9", style=label.style_label_down, color=color.green, textcolor=color.white)
label.new(bar_index, R8, "R8", style=label.style_label_down, color=color.green, textcolor=color.white)
label.new(bar_index, R7, "R7", style=label.style_label_down, color=color.green, textcolor=color.white)
label.new(bar_index, R6, "R6", style=label.style_label_down, color=color.green, textcolor=color.white)
label.new(bar_index, R5, "R5", style=label.style_label_down, color=color.green, textcolor=color.white)
label.new(bar_index, R4, "R4", style=label.style_label_down, color=color.green, textcolor=color.white)
label.new(bar_index, R3, "R3", style=label.style_label_down, color=color.green, textcolor=color.white)
label.new(bar_index, R2, "R2", style=label.style_label_down, color=color.green, textcolor=color.white)
label.new(bar_index, R1, "R1", style=label.style_label_down, color=color.green, textcolor=color.white)
label.new(bar_index, S1, "S1", style=label.style_label_up, color=color.red, textcolor=color.white)
label.new(bar_index, S2, "S2", style=label.style_label_up, color=color.red, textcolor=color.white)
label.new(bar_index, S3, "S3", style=label.style_label_up, color=color.red, textcolor=color.white)
label.new(bar_index, S4, "S4", style=label.style_label_up, color=color.red, textcolor=color.white)
label.new(bar_index, S5, "S5", style=label.style_label_up, color=color.red, textcolor=color.white)
label.new(bar_index, S6, "S6", style=label.style_label_up, color=color.red, textcolor=color.white)
label.new(bar_index, S7, "S7", style=label.style_label_up, color=color.red, textcolor=color.white)
label.new(bar_index, S8, "S8", style=label.style_label_up, color=color.red, textcolor=color.white)
label.new(bar_index, S9, "S9", style=label.style_label_up, color=color.red, textcolor=color.white)
indicator("Gann Square of Nine HA Pivot Levels", overlay=true)
// ===== USER INPUT =====
haPivot = input.float(3339.33, "HA Pivot")
degreeStep = input.int(45, "Degree Step (Default 45°)")
// ===== CALCULATIONS =====
root = math.sqrt(haPivot)
step = degreeStep / 360.0
// Function to calculate level
gannLevel(multiplier) =>
math.pow(root + (step * multiplier), 2)
// R levels
R1 = gannLevel(1)
R2 = gannLevel(2)
R3 = gannLevel(3)
R4 = gannLevel(4)
R5 = gannLevel(5)
R6 = gannLevel(6)
R7 = gannLevel(7)
R8 = gannLevel(8)
R9 = gannLevel(9)
// S levels
S1 = math.pow(root - (step * 1), 2)
S2 = math.pow(root - (step * 2), 2)
S3 = math.pow(root - (step * 3), 2)
S4 = math.pow(root - (step * 4), 2)
S5 = math.pow(root - (step * 5), 2)
S6 = math.pow(root - (step * 6), 2)
S7 = math.pow(root - (step * 7), 2)
S8 = math.pow(root - (step * 8), 2)
S9 = math.pow(root - (step * 9), 2)
// ===== PLOTTING =====
plot(haPivot, "HA Pivot", color=color.yellow, linewidth=2)
plot(R1, "R1", color=color.green)
plot(R2, "R2", color=color.green)
plot(R3, "R3", color=color.green)
plot(R4, "R4", color=color.green)
plot(R5, "R5", color=color.green)
plot(R6, "R6", color=color.green)
plot(R7, "R7", color=color.green)
plot(R8, "R8", color=color.green)
plot(R9, "R9", color=color.green)
plot(S1, "S1", color=color.red)
plot(S2, "S2", color=color.red)
plot(S3, "S3", color=color.red)
plot(S4, "S4", color=color.red)
plot(S5, "S5", color=color.red)
plot(S6, "S6", color=color.red)
plot(S7, "S7", color=color.red)
plot(S8, "S8", color=color.red)
plot(S9, "S9", color=color.red)
// ===== LABELS (last bar only) =====
if bar_index == last_bar_index
label.new(bar_index, R9, "R9", style=label.style_label_down, color=color.green, textcolor=color.white)
label.new(bar_index, R8, "R8", style=label.style_label_down, color=color.green, textcolor=color.white)
label.new(bar_index, R7, "R7", style=label.style_label_down, color=color.green, textcolor=color.white)
label.new(bar_index, R6, "R6", style=label.style_label_down, color=color.green, textcolor=color.white)
label.new(bar_index, R5, "R5", style=label.style_label_down, color=color.green, textcolor=color.white)
label.new(bar_index, R4, "R4", style=label.style_label_down, color=color.green, textcolor=color.white)
label.new(bar_index, R3, "R3", style=label.style_label_down, color=color.green, textcolor=color.white)
label.new(bar_index, R2, "R2", style=label.style_label_down, color=color.green, textcolor=color.white)
label.new(bar_index, R1, "R1", style=label.style_label_down, color=color.green, textcolor=color.white)
label.new(bar_index, S1, "S1", style=label.style_label_up, color=color.red, textcolor=color.white)
label.new(bar_index, S2, "S2", style=label.style_label_up, color=color.red, textcolor=color.white)
label.new(bar_index, S3, "S3", style=label.style_label_up, color=color.red, textcolor=color.white)
label.new(bar_index, S4, "S4", style=label.style_label_up, color=color.red, textcolor=color.white)
label.new(bar_index, S5, "S5", style=label.style_label_up, color=color.red, textcolor=color.white)
label.new(bar_index, S6, "S6", style=label.style_label_up, color=color.red, textcolor=color.white)
label.new(bar_index, S7, "S7", style=label.style_label_up, color=color.red, textcolor=color.white)
label.new(bar_index, S8, "S8", style=label.style_label_up, color=color.red, textcolor=color.white)
label.new(bar_index, S9, "S9", style=label.style_label_up, color=color.red, textcolor=color.white)
보호된 스크립트입니다
이 스크립트는 비공개 소스로 게시됩니다. 하지만 이를 자유롭게 제한 없이 사용할 수 있습니다 – 자세한 내용은 여기에서 확인하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
보호된 스크립트입니다
이 스크립트는 비공개 소스로 게시됩니다. 하지만 이를 자유롭게 제한 없이 사용할 수 있습니다 – 자세한 내용은 여기에서 확인하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.