Tarot : Major Arcana
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © ByzantineSC

//@version=5
indicator("Tarot Major Arcana", overlay=true)

///Candle Division
candleup = high-low


///division
slice = candleup/22


///Major Arcana UP
fool_up = (close <= low+(slice)) and (close >= low)
magi_up = (close <= low+(slice*2)) and (close >= (low+slice))
high_up = (close <= low+(slice*3)) and (close >= (low+slice*2))
emps_up = (close <= low+(slice*4)) and (close >= (low+slice*3))
empr_up =  (close <= low+(slice*5)) and (close >= (low+slice*4))
hier_up =  (close <= low+(slice*6)) and (close >= (low+slice*5))
love_up =  (close <= low+(slice*7)) and (close >= (low+slice*6))
char_up =  (close <= low+(slice*8)) and (close >= (low+slice*7))
stre_up = (close <= low+(slice*9)) and (close >= (low+slice*8))
herm_up =  (close <= low+(slice*10)) and (close >= (low+slice*9))
whee_up =  (close <= low+(slice*11)) and (close >= (low+slice*10))
just_up =  (close <= low+(slice*12)) and (close >= (low+slice*11))
hang_up = (close <= low+(slice*13)) and (close >= (low+slice*12))
deat_up = (close <= low+(slice*14)) and (close >= (low+slice*13))
temp_up = (close <= low+(slice*15)) and (close >= (low+slice*14))
devi_up =  (close <= low+(slice*16)) and (close >= (low+slice*15))
towe_up =  (close <= low+(slice*17)) and (close >= (low+slice*16))
star_up = (close <= low+(slice*18)) and (close >= (low+slice*17))
moon_up = (close <= low+(slice*19)) and (close >= (low+slice*18))
sun_up = (close <= low+(slice*20)) and (close >= (low+slice*19))
judg_up =  (close <= low+(slice*21)) and (close >= (low+slice*20))
worl_up =  (close <= high) and (close >= (low+slice*21))


//plotcard
fool_u = fool_up
plotchar(fool_u, char='😀', text='Fool', location=location.abovebar)
magi_u = magi_up
plotchar(magi_u, char='🔮', text='Magi', location=location.abovebar)
high_u = high_up
plotchar(high_u, char='🧿', text='High', location=location.abovebar)
emps_u = emps_up
plotchar(emps_u, char='♀️', text='Emps', location=location.abovebar)
empr_u = empr_up
plotchar(empr_u, char='♂️', text='Empr', location=location.abovebar)
hier_u = hier_up
plotchar(hier_u, char='🕍', text='Hier', location=location.abovebar)
love_u = love_up
plotchar(love_u, char='💑', text='Love', location=location.abovebar)
char_u = char_up
plotchar(char_u, char='🚚', text='Char', location=location.abovebar)
stre_u = stre_up
plotchar(stre_u, char='💪', text='Stre', location=location.abovebar)
herm_u = herm_up
plotchar(herm_u, char='🧙', text='Herm', location=location.abovebar)
whee_u = whee_up
plotchar(whee_u, char='🎡', text='Whee', location=location.abovebar)
just_u = just_up
plotchar(just_u, char='⚖️', text='Just', location=location.abovebar)
hang_u = hang_up
plotchar(hang_u, char='🙃', text='Hang', location=location.abovebar)
deat_u = deat_up
plotchar(deat_u, char='💀', text='Deat', location=location.abovebar)
temp_u = temp_up
plotchar(temp_u, char='👼', text='Temp', location=location.abovebar)
devi_u = devi_up
plotchar(devi_u, char='😈', text='Devi', location=location.abovebar)
towe_u = towe_up
plotchar(towe_u, char="⚡" ,text='Towe', location=location.abovebar)
star_u = star_up
plotchar(star_u, char='🌟', text='Star', location=location.abovebar)
moon_u = moon_up
plotchar(moon_u, char='🌜', text='Moon', location=location.abovebar)
sun_u = sun_up
plotchar(sun_u, char='🌞', text='Sun', location=location.abovebar)
judg_u = judg_up
plotchar(judg_u, char='👥', text='Judg', location=location.abovebar)
worl_u = worl_up
plotchar(worl_u, char='🌎', text='Worl', location=location.abovebar)