ucsgears

FibGrid- Fire, Tree, Snow (supports only SPY Sectors ETFs)

786 5 75
FibGrid - Version 2

Coded to pick the custom SH and SL for a specific stock symbol.

Currently supports following symbols
XLK             , XLB             , XLF             , XLI             , XLB             , XLE             , XLU             , XLP             , XLY             .

Future Versions - Will include Highly liquid ETF and Stock Symbols. Futures and Forex Symbols

----
Do use the FibGrid Version 1, if you want to work on other symbols. -
FibGrid - A. B. C
Comment:
snapshot
Remove from Favorite Scripts Add to Favorite Scripts
study("VOODOO - Fire, Tree, Snow (SPY Sector)", shorttitle = "Fib FTS (Sector)", overlay = true)
SL = tickerid == 'AMEX:XLE' ? 37.4 : tickerid == 'AMEX:XLB' ? 16.53 : tickerid == 'AMEX:XLF' ? 10.35 : tickerid == 'AMEX:XLI' ? 26.79 : tickerid == 'AMEX:XLK' ? 12.94 : tickerid == 'AMEX:XLP' ? 19.28 : tickerid == 'AMEX:XLU' ? 22.48 : tickerid == 'AMEX:XLV' ? 21.63 : tickerid == 'AMEX:XLY' ? 33.07 : 0 
SH = tickerid == 'AMEX:XLE' ? 62.3 : tickerid == 'AMEX:XLB' ? 24.44 : tickerid == 'AMEX:XLF' ? 17.2 : tickerid == 'AMEX:XLI' ? 33.46 : tickerid == 'AMEX:XLK' ? 28.6 : tickerid == 'AMEX:XLP' ? 30.29 : tickerid == 'AMEX:XLU' ? 32.08 : tickerid == 'AMEX:XLV' ? 33.16 : tickerid == 'AMEX:XLY' ? 41.78 : 0 
W = SH - SL

// VOODOO LINE (FIB GRID) Calulation
//FIRE LINES


Level0 = input(true)
H0000 = Level0 ? SL : SL
plot (H0000, color = red, linewidth=2, style = line, title = "Level 0") 

H1000 = Level0 ? SH : SL
plot (H1000, color = red, linewidth=2, style = line, title = "Level 0") 

Level1 = input(true)
H1618 = Level1 ? W * 1.618 + SL : SL
plot (H1618, color = red, linewidth=2, style = line, title = "Level 1") 

Level2 = input(true)
H2618 = Level2 ? W * 2.618 + SL: SL
plot (H2618, color = red, linewidth=2, style = line, title = "Level 2")

Level3 = input(true)
H4236 = Level3 ? W * 4.236 + SL : SL
plot (H4236, color = red, linewidth=2, style = line, title = "Level 3")

Level4 = input (true)
H6854 = Level4 ?  W * 6.854 + SL : SL
plot (H6854, color = red, linewidth=2, style = line, title = "Level 4")

Level5 = input(true)
H11090 = Level5 ? W * 11.09 + SL : SL
plot (H11090, color = red, linewidth=2, style = line, title = "Level 5")



//TREE LINES
H0382 = Level0 ? W * 0.382 + SL : SL
H0618 = Level0 ? W * 0.618 + SL : SL
plot (H0382, color = green, linewidth=2, style = line, title = "Level 0A")
plot (H0618, color = green, linewidth=2, style = line, title = "Level 0B")


H1236 = Level1 ? W * 1.236 + SL : SL
H1382 = Level1 ? W * 1.382 + SL : SL
plot (H1236, color = green, linewidth=2, style = line, title = "Level 1A")
plot (H1382, color = green, linewidth=2, style = line, title = "Level 1B")


H2000 = Level2 ? W * 2.000 + SL : SL
H2236 = Level2 ? W * 2.236 + SL : SL
plot (H2000, color = green, linewidth=2, style = line, title = "Level 2A")
plot (H2236, color = green, linewidth=2, style = line, title = "Level 2B")


H3236 = Level3 ? W * 3.236 + SL : SL
H3618 = Level3 ? W * 3.618 + SL : SL
plot (H3236, color = green, linewidth=2, style = line, title = "Level 3A")
plot (H3618, color = green, linewidth=2, style = line, title = "Level 3B")


H5236 = Level4 ? W * 5.236 + SL : SL
H5854 = Level4 ? W * 5.854 + SL : SL
plot (H5236, color = green, linewidth=2, style = line, title = "Level 4A")
plot (H5854, color = green, linewidth=2, style = line, title = "Level 4B")


H8472 = Level5 ? W * 8.472 + SL : SL
H9472 = Level5 ? W * 9.472 + SL : SL
plot (H8472, color = green, linewidth=2, style = line, title = "Level 5A")
plot (H9472, color = green, linewidth=2, style = line, title = "Level 5B")



//SNOW LINES
H0146 = Level0 ? W * 0.146 + SL : SL
H0236 = Level0 ? W * 0.236 + SL : SL
H0472 = Level0 ? W * 0.472 + SL : SL
H0528 = Level0 ? W * 0.528 + SL : SL
H0764 = Level0 ? W * 0.764 + SL : SL
H0854 = Level0 ? W * 0.854 + SL : SL
plot (H0146, color = black, linewidth=2, style = line)
plot (H0236, color = black, linewidth=2, style = line)
plot (H0472, color = black, linewidth=2, style = line)
plot (H0528, color = black, linewidth=2, style = line)
plot (H0764, color = black, linewidth=2, style = line)
plot (H0854, color = black, linewidth=2, style = line)

H1090 = Level1 ? W * 1.090 + SL : SL
H1146 = Level1 ? W * 1.146 + SL : SL
H1292 = Level1 ? W * 1.292 + SL : SL
H1326 = Level1 ? W * 1.326 + SL : SL
H1472 = Level1 ? W * 1.472 + SL : SL
H1528 = Level1 ? W * 1.528 + SL : SL
plot (H1090, color = black, linewidth=2, style = line)
plot (H1146, color = black, linewidth=2, style = line)
plot (H1292, color = black, linewidth=2, style = line)
plot (H1326, color = black, linewidth=2, style = line)
plot (H1472, color = black, linewidth=2, style = line)
plot (H1528, color = black, linewidth=2, style = line)

H1764 = Level2 ? W * 1.764 + SL : SL
H1854 = Level2 ? W * 1.854 + SL : SL
H2090 = Level2 ? W * 2.090 + SL : SL
H2146 = Level2 ? W * 2.146 + SL : SL
H2382 = Level2 ? W * 2.382 + SL : SL
H2472 = Level2 ? W * 2.472 + SL : SL
plot (H1764, color = black, linewidth=2, style = line)
plot (H1854, color = black, linewidth=2, style = line)
plot (H2090, color = black, linewidth=2, style = line)
plot (H2146, color = black, linewidth=2, style = line)
plot (H2382, color = black, linewidth=2, style = line)
plot (H2472, color = black, linewidth=2, style = line)

H2854 = Level3 ? W * 2.854 + SL : SL
H3000 = Level3 ? W * 3.000 + SL : SL
H3382 = Level3 ? W * 3.382 + SL : SL
H3472 = Level3 ? W * 3.472 + SL : SL
H3854 = Level3 ? W * 3.854 + SL : SL
H4000 = Level3 ? W * 4.000 + SL : SL
plot (H2854, color = black, linewidth=2, style = line)
plot (H3000, color = black, linewidth=2, style = line)
plot (H3382, color = black, linewidth=2, style = line)
plot (H3472, color = black, linewidth=2, style = line)
plot (H3854, color = black, linewidth=2, style = line)
plot (H4000, color = black, linewidth=2, style = line)

H4618 = Level4 ? W * 4.618 + SL : SL
H4854 = Level4 ? W * 4.854 + SL : SL
H5472 = Level4 ? W * 5.472 + SL : SL
H5618 = Level4 ? W * 5.618 + SL : SL
H6236 = Level4 ? W * 6.236 + SL : SL
H6472 = Level4 ? W * 6.472 + SL : SL
plot (H4618, color = black, linewidth=2, style = line)
plot (H4854, color = black, linewidth=2, style = line)
plot (H5472, color = black, linewidth=2, style = line)
plot (H5618, color = black, linewidth=2, style = line)
plot (H6236, color = black, linewidth=2, style = line)
plot (H6472, color = black, linewidth=2, style = line)

H7472 = Level5 ? W * 7.472 + SL : SL
H7854 = Level5 ? W * 7.854 + SL : SL
H8854 = Level5 ? W * 8.854 + SL : SL
H9090 = Level5 ? W * 9.090 + SL : SL
H10090 = Level5 ? W * 10.090 + SL : SL
H10472 = Level5 ? W * 10.472 + SL : SL
plot (H7472, color = black, linewidth=2, style = line)
plot (H7854, color = black, linewidth=2, style = line)
plot (H8854, color = black, linewidth=2, style = line)
plot (H9090, color = black, linewidth=2, style = line)
plot (H10090, color = black, linewidth=2, style = line)
plot (H10472, color = black, linewidth=2, style = line)
NBS
a year ago
Does anyone have a modified version that works in TOS?
Reply
ucsgears PRO NBS
11 months ago
Simpler Options Sells this for TOS - $999.... ;)
Reply
eleutron298
7 months ago
thnaks for sharing. Is this the code for Think or Swim?
Reply
ucsgears PRO eleutron298
7 months ago
Its only for the Sector ETF, Works on Tradingview only. Unless changes are made.
Reply
TradingElixir
2 months ago
Thank you very much for sharing. How do I get this to work in Thinkorswim platform? I Tried adding a new study but no luck.
Reply
Ideas Scripts Chart
United States
United Kingdom
India
España
Italia
Brasil
Россия
Türkiye
日本
한국
Home Stock Screener Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Private Messages Chat Ideas Published Followers Following Priority Support Public Profile Profile Settings Billing Sign Out