// This source code is subject to the terms of the Mozilla Public License 2_0 at https://mozilla_org/MPL/2_0/
// © MVPMC
//@version=4
study(title="✖ 𝗡𝘂𝗻𝗰𝗵𝘂𝗰𝗸𝘀", overlay=true)
bool Priceline = input(title="Show Priceline" , defval=true)
bool Nullchucks = input(title="Show null chucks" , defval=true)
bool Chains = input(title="Color chains as candlesticks" , defval=false)
string Theme = input(title="Theme" , options=["TradingView","Grayscale","Japanese", "Blush" , "Matrix" , "Nightdrive", "Colorblind", "idunno", "CMYK"], defval="TradingView")
High_Color = Theme == "TradingView" ? #26a69a : Theme == "Grayscale" ? #808080 : Theme == "Japanese" ? #FFFFFF : Theme == "CMYK" ? #03e8d6 : Theme == "Blush" ? #e7a0a9 : Theme == "Matrix" ? #63cb94 : Theme == "Nightdrive" ? #4fa7e5 : Theme == "Colorblind" ? #00a2cb : Theme == "idunno" ? #249ba9 : #FF00FF
Low_Color = Theme == "TradingView" ? #ef5350 : Theme == "Grayscale" ? #404040 : Theme == "Japanese" ? #000000 : Theme == "CMYK" ? #e304eb : Theme == "Blush" ? #503e44 : Theme == "Matrix" ? #34734c : Theme == "Nightdrive" ? #9b68ae : Theme == "Colorblind" ? #ffb400 : Theme == "idunno" ? #e13268 : #FF00FF
Center_Color = Theme == "TradingView" ? #808080 : Theme == "Grayscale" ? #606060 : Theme == "Japanese" ? #808080 : Theme == "CMYK" ? #f0af03 : Theme == "Blush" ? #c0999e : Theme == "Matrix" ? #141e19 : Theme == "Nightdrive" ? #a5cfea : Theme == "Colorblind" ? #858585 : Theme == "idunno" ? #765b86 : #FF00FF
High_Display = high > high[1] ? true : false
High_Open = min(high, high[1])
High_Close = high
Low_Display = low < low[1] ? true : false
Low_Open = max(low, low[1])
Low_Close = low
Center_open = Low_Open < High_Open ? Low_Open : High_Open
Center_close = Low_Open > High_Open ? High_Open : Low_Open
Wickcolor = Chains ? open < close ? High_Color : Low_Color : Center_Color
Pricecolor = Priceline ? close > High_Open ? High_Color : close < Low_Open ? Low_Color : Center_Color : #00000000
plotHighcolor = Nullchucks ? High_Color : High_Display ? High_Color : #00000000
plotLowcolor = Nullchucks ? Low_Color : Low_Display ? Low_Color : #00000000
plotcandle(High_Open, High_Close, Center_open, High_Close, title="Higher", color=plotHighcolor, bordercolor=Theme == "Japanese" ? #000000 : plotHighcolor, wickcolor=Wickcolor)
plotcandle(Low_Open, Center_close, Low_Close, Low_Close, title="Lower" , color=plotLowcolor, bordercolor=plotLowcolor, wickcolor=Wickcolor)
plot(close, title="Priceline", color=Pricecolor, trackprice=Priceline, show_last=1)