StockFetcher Forums · Public Filter List · Draw Gann Square of Nine (SQ9) Levels on Charts<< >>Post Follow-up
manifestation
5 posts
msg #149281
Ignore manifestation
modified
10/4/2019 11:58:33 PM

If you don't know what Gann’s Square of Nine or Spiral Chart is, please search about it on the Internet. It is one of the most popular tools for Gann traders.

From Major Top:

Fetcher[// Input

Apply to symlist(AAPL)
set{DigitMultiplier, 1} // Multiplying the price in case if it is too small. Preferably by powers of 2
set{DegInc, 0.5} // The increment by which the angle increases. Don't tough it unless you are familiar with the SQ9
set{MajorPoint, High 5 year high * DigitMultiplier} // The reference top/bottom. You may change it to a specific number
Offset 9/30/2019 // This line is optional

// Output

set{PriceRoot, Pow(MajorPoint, 0.5)}
set{Deg1, DegInc}
set{Deg2, 2 * DegInc}
set{Deg3, 3 * DegInc}
set{Deg4, 4 * DegInc}
set{Deg5, 5 * DegInc}
set{Deg6, 6 * DegInc}
set{Step_90, PriceRoot - Deg1}
set{Step_180, PriceRoot - Deg2}
set{Step_270, PriceRoot - Deg3}
set{Step_360, PriceRoot - Deg4}
set{Step_450, PriceRoot - Deg5}
set{Step_540, PriceRoot - Deg6}
set{Level_90, Pow(Step_90, 2)}
set{Level_180, Pow(Step_180, 2)}
set{Level_270, Pow(Step_270, 2)}
set{Level_360, Pow(Step_360, 2)}
set{Level_450, Pow(Step_450, 2)}
set{Level_540, Pow(Step_540, 2)}
set{Level_0m, MajorPoint / DigitMultiplier}
set{Level_90m, Level_90 / DigitMultiplier}
set{Level_180m, Level_180 / DigitMultiplier}
set{Level_270m, Level_270 / DigitMultiplier}
set{Level_360m, Level_360 / DigitMultiplier}
set{Level_450m, Level_450 / DigitMultiplier}
set{Level_540m, Level_540 / DigitMultiplier}

Draw Level_0m on plot close
Draw Level_90m on plot close
Draw Level_180m on plot close
Draw Level_270m on plot close
Draw Level_360m on plot close
Draw Level_450m on plot close
Draw Level_540m on plot close

Chart-time is 2 years
Chart-size is huge
]



From Major Bottom:

Fetcher[// Input

Apply to symlist(SLV)
set{DigitMultiplier, 16} // Multiplying the price in case if it is too small. Preferably by the powers of 2.
set{DegInc, 0.5} // The increment by which the angle increases. Don't tough it unless you are familiar with the SQ9
set{MajorPoint, Low 5 year low * DigitMultiplier} // The reference top/bottom. You may change it to a specific number
Offset 9/30/2019 // This line is optional

// Output

set{PriceRoot, Pow(MajorPoint, 0.5)}
set{Deg1, DegInc}
set{Deg2, 2 * DegInc}
set{Deg3, 3 * DegInc}
set{Deg4, 4 * DegInc}
set{Deg5, 5 * DegInc}
set{Deg6, 6 * DegInc}
set{Step_90, PriceRoot + Deg1}
set{Step_180, PriceRoot + Deg2}
set{Step_270, PriceRoot + Deg3}
set{Step_360, PriceRoot + Deg4}
set{Step_450, PriceRoot + Deg5}
set{Step_540, PriceRoot + Deg6}
set{Level_90, Pow(Step_90, 2)}
set{Level_180, Pow(Step_180, 2)}
set{Level_270, Pow(Step_270, 2)}
set{Level_360, Pow(Step_360, 2)}
set{Level_450, Pow(Step_450, 2)}
set{Level_540, Pow(Step_540, 2)}
set{Level_0m, MajorPoint / DigitMultiplier}
set{Level_90m, Level_90 / DigitMultiplier}
set{Level_180m, Level_180 / DigitMultiplier}
set{Level_270m, Level_270 / DigitMultiplier}
set{Level_360m, Level_360 / DigitMultiplier}
set{Level_450m, Level_450 / DigitMultiplier}
set{Level_540m, Level_540 / DigitMultiplier}

Draw Level_0m on plot close
Draw Level_90m on plot close
Draw Level_180m on plot close
Draw Level_270m on plot close
Draw Level_360m on plot close
Draw Level_450m on plot close
Draw Level_540m on plot close

Chart-time is 2 years
Chart-size is huge
]



KSK8
561 posts
msg #149282
Ignore KSK8
10/5/2019 11:31:45 AM

While I am no expert when it comes to W.D. Gann studies, I find this pretty unique. Good work!

xarlor
585 posts
msg #149289
Ignore xarlor
10/5/2019 5:44:50 PM

Impressive filter, manifestation. I do want to point out that SF does not recognize highs and lows beyond 3 years: So the line below is substituting your 5-year high iwth the 3-year high.

set{MajorPoint, High 5 year high * DigitMultiplier} // The reference top/bottom. You may change it to a specific number

Fetcher[
optionable
add column high 10-year high
add column high 9-year high
add column high 8-year high
add column high 7-year high
add column high 6-year high
add column high 5-year high
add column high 4-year high
add column high 3-year high
add column high 2-year high
add column high 1-year high

high 1-year high < high 2-year high
high 2-year high < high 3-year high
]



manifestation
5 posts
msg #149302
Ignore manifestation
modified
10/7/2019 1:44:18 AM

Thanks for the comments. I have combined both scripts so that it could be used for both tops and bottoms.

Fetcher[// Input

Apply to symlist(AAPL,CHGG)
set{DigitMultiplier, 1} // Multiplying the price in case it's too small. Prefer by powers of 4
set{DegInc, 0.5} // The increment by which the angle increases. Default = 0.5 (90 deg)
set{MajorPoint, High 3 year high} // The starting top/bottom. May change to a specific number as well
set{TopOrBottom, -1} // -1 for Top, 1 for Bottom
Offset 9/30/2019 // This line is optional

// Output

set{MultipliedPoint, MajorPoint * DigitMultiplier}
set{PriceRoot, Pow(MultipliedPoint, 0.5)}
set{Deg1, DegInc * TopOrBottom}
set{Inc2, 2 * DegInc}
set{Inc3, 3 * DegInc}
set{Inc4, 4 * DegInc}
set{Inc5, 5 * DegInc}
set{Inc6, 6 * DegInc}
set{Deg2, Inc2 * TopOrBottom}
set{Deg3, Inc3 * TopOrBottom}
set{Deg4, Inc4 * TopOrBottom}
set{Deg5, Inc5 * TopOrBottom}
set{Deg6, Inc6 * TopOrBottom}
set{Step_90, PriceRoot + Deg1}
set{Step_180, PriceRoot + Deg2}
set{Step_270, PriceRoot + Deg3}
set{Step_360, PriceRoot + Deg4}
set{Step_450, PriceRoot + Deg5}
set{Step_540, PriceRoot + Deg6}
set{Level_90, Pow(Step_90, 2)}
set{Level_180, Pow(Step_180, 2)}
set{Level_270, Pow(Step_270, 2)}
set{Level_360, Pow(Step_360, 2)}
set{Level_450, Pow(Step_450, 2)}
set{Level_540, Pow(Step_540, 2)}
set{Level_0m, MultipliedPoint / DigitMultiplier}
set{Level_90m, Level_90 / DigitMultiplier}
set{Level_180m, Level_180 / DigitMultiplier}
set{Level_270m, Level_270 / DigitMultiplier}
set{Level_360m, Level_360 / DigitMultiplier}
set{Level_450m, Level_450 / DigitMultiplier}
set{Level_540m, Level_540 / DigitMultiplier}

Draw price line at Level_0m
Draw price line at Level_90m
Draw price line at Level_180m
Draw price line at Level_270m
Draw price line at Level_360m
Draw price line at Level_450m
Draw price line at Level_540m

set{Step_1, Close - 1}
set{Step_2, Pow(Step_1, 0.5)}
set{Step_3, Step_2 * 180}
set{Step_4, Step_3 + 135}
set{Step_5, Step_4 / 36}
set{Step_6, MOD(Step_5,10)}
set{SQ9_Degree, Step_6 * 36}

Draw SQ9_Degree
Draw SQ9_Degree line at 90
Draw SQ9_Degree line at 180
Draw SQ9_Degree line at 270

Chart-time is 2 years
Chart-size is huge
]



godhasplans
1 posts
msg #149385
Ignore godhasplans
10/21/2019 8:42:14 PM

As a Gann fan, I really appreciate your input.

vict0rchan
5 posts
msg #151974
Ignore vict0rchan
4/30/2020 7:07:52 AM

Great work. I took the liberty to expand it to 9 levels.

Fetcher[// Input

Apply to symlist(CPA,BDC)
set{DigitMultiplier, 1} // Multiplying the price in case it's too small. Prefer by powers of 4
set{DegInc, 0.5} // The increment by which the angle increases. Default = 0.5 (90 deg)
set{MajorPoint, High 100 day high} // The starting top/bottom. May change to a specific number as well
set{TopOrBottom, -1} // -1 for Top, 1 for Bottom
Offset 4/29/2020 // This line is optional

// Output

set{MultipliedPoint, MajorPoint * DigitMultiplier}
set{PriceRoot, Pow(MultipliedPoint, 0.5)}
set{Deg1, DegInc * TopOrBottom}
set{Inc2, 2 * DegInc}
set{Inc3, 3 * DegInc}
set{Inc4, 4 * DegInc}
set{Inc5, 5 * DegInc}
set{Inc6, 6 * DegInc}
set{Inc7, 7 * DegInc}
set{Inc8, 8 * DegInc}
set{Inc9, 9 * DegInc}
set{Deg2, Inc2 * TopOrBottom}
set{Deg3, Inc3 * TopOrBottom}
set{Deg4, Inc4 * TopOrBottom}
set{Deg5, Inc5 * TopOrBottom}
set{Deg6, Inc6 * TopOrBottom}
set{Deg7, Inc7 * TopOrBottom}
set{Deg8, Inc8 * TopOrBottom}
set{Deg9, Inc9 * TopOrBottom}
set{Step_90, PriceRoot + Deg1}
set{Step_180, PriceRoot + Deg2}
set{Step_270, PriceRoot + Deg3}
set{Step_360, PriceRoot + Deg4}
set{Step_450, PriceRoot + Deg5}
set{Step_540, PriceRoot + Deg6}
set{Step_630, PriceRoot + Deg7}
set{Step_720, PriceRoot + Deg8}
set{Step_810, PriceRoot + Deg9}
set{Level_90, Pow(Step_90, 2)}
set{Level_180, Pow(Step_180, 2)}
set{Level_270, Pow(Step_270, 2)}
set{Level_360, Pow(Step_360, 2)}
set{Level_450, Pow(Step_450, 2)}
set{Level_540, Pow(Step_540, 2)}
set{Level_630, Pow(Step_630, 2)}
set{Level_720, Pow(Step_720, 2)}
set{Level_810, Pow(Step_810, 2)}
set{Level_0m, MultipliedPoint / DigitMultiplier}
set{Level_90m, Level_90 / DigitMultiplier}
set{Level_180m, Level_180 / DigitMultiplier}
set{Level_270m, Level_270 / DigitMultiplier}
set{Level_360m, Level_360 / DigitMultiplier}
set{Level_450m, Level_450 / DigitMultiplier}
set{Level_540m, Level_540 / DigitMultiplier}
set{Level_630m, Level_630 / DigitMultiplier}
set{Level_720m, Level_720 / DigitMultiplier}
set{Level_810m, Level_810 / DigitMultiplier}

Draw price line at Level_0m
Draw price line at Level_90m
Draw price line at Level_180m
Draw price line at Level_270m
Draw price line at Level_360m
Draw price line at Level_450m
Draw price line at Level_540m
Draw price line at Level_630m
Draw price line at Level_720m
Draw price line at Level_810m

set{Step_1, Close - 1}
set{Step_2, Pow(Step_1, 0.5)}
set{Step_3, Step_2 * 180}
set{Step_4, Step_3 + 135}
set{Step_5, Step_4 / 36}
set{Step_6, MOD(Step_5,10)}
set{SQ9_Degree, Step_6 * 36}

Draw SQ9_Degree
Draw SQ9_Degree line at 90
Draw SQ9_Degree line at 180
Draw SQ9_Degree line at 270

Chart-time is 2 years
Chart-size is huge
]



scvidar
87 posts
msg #152000
Ignore scvidar
4/30/2020 7:13:50 PM

Forgive my ignorance but how does that help me trade?

StockFetcher Forums · Public Filter List · Draw Gann Square of Nine (SQ9) Levels on Charts<< >>Post Follow-up

*** Disclaimer *** StockFetcher.com does not endorse or suggest any of the securities which are returned in any of the searches or filters. They are provided purely for informational and research purposes. StockFetcher.com does not recommend particular securities. StockFetcher.com, Vestyl Software, L.L.C. and involved content providers shall not be liable for any errors or delays in the content, or for any actions taken based on the content.


Copyright 2022 - Vestyl Software L.L.C.Terms of Service | License | Questions or comments? Contact Us
EOD Data sources: DDFPlus & CSI Data Quotes delayed during active market hours. Delay times are at least 15 mins for NASDAQ, 20 mins for NYSE and Amex. Delayed intraday data provided by DDFPlus


This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.