Indicator · Pine Script v5 · Own pane

Dominance Pie Chart

by regalouisei· code credited to fikira

This indicator draws a pie chart of cryptocurrency market-cap dominance in a separate pane.

View on GitHub

GitHub stars2on the repository
Pine versionv5runs as is
Lines of code485
Settings0inputs
LicenceNone statedfile: MPL-2.0
Last update8 months ago25 Feb 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above, or the copy button on the code below.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.

Source Code

485 lines of Pine Script v5 from pinescript/editors_picks/dominance-pie-chart.pine, published under MPL-2.0 (file header). Keep the author's credit and licence lines when you reuse it.

dominance-pie-chart.pine
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © fikira
//@version=5

indicator('Dominance Pie Chart', overlay=false)

rad = 40

secBTCc   = request.security('CRYPTOCAP:BTC.D'   , '', close, ignore_invalid_symbol=true)
secBTCo   = request.security('CRYPTOCAP:BTC.D'   , '', open , ignore_invalid_symbol=true)
secETHc   = request.security('CRYPTOCAP:ETH.D'   , '', close, ignore_invalid_symbol=true)
secBNBc   = request.security('CRYPTOCAP:BNB.D'   , '', close, ignore_invalid_symbol=true)
secDOTc   = request.security('CRYPTOCAP:DOT.D'   , '', close, ignore_invalid_symbol=true)
secADAc   = request.security('CRYPTOCAP:ADA.D'   , '', close, ignore_invalid_symbol=true)
secXRPc   = request.security('CRYPTOCAP:XRP.D'   , '', close, ignore_invalid_symbol=true)
secLTCc   = request.security('CRYPTOCAP:LTC.D'   , '', close, ignore_invalid_symbol=true)
secLINKc  = request.security('CRYPTOCAP:LINK.D'  , '', close, ignore_invalid_symbol=true)
secBCHc   = request.security('CRYPTOCAP:BCH.D'   , '', close, ignore_invalid_symbol=true)
secXLMc   = request.security('CRYPTOCAP:XLM.D'   , '', close, ignore_invalid_symbol=true)
secEOSc   = request.security('CRYPTOCAP:EOS.D'   , '', close, ignore_invalid_symbol=true)
secXMRc   = request.security('CRYPTOCAP:XMR.D'   , '', close, ignore_invalid_symbol=true)
secTRXc   = request.security('CRYPTOCAP:TRX.D'   , '', close, ignore_invalid_symbol=true)
secBSVc   = request.security('CRYPTOCAP:BSV.D'   , '', close, ignore_invalid_symbol=true)
secMIOTAc = request.security('CRYPTOCAP:MIOTA.D' , '', close, ignore_invalid_symbol=true)
secOTHc   = request.security('CRYPTOCAP:OTHERS.D', '', close, ignore_invalid_symbol=true)
secUSDTc  = request.security('CRYPTOCAP:USDT.D'  , '', close, ignore_invalid_symbol=true)


zero  = 0
sum   = 0.0
btc   = sum + secBTCc  , sum := btc
eth   = sum + secETHc  , sum := eth
bnb   = sum + secBNBc  , sum := bnb
dot   = sum + secDOTc  , sum := dot
ada   = sum + secADAc  , sum := ada
xrp   = sum + secXRPc  , sum := xrp
ltc   = sum + secLTCc  , sum := ltc
link  = sum + secLINKc , sum := link
bch   = sum + secBCHc  , sum := bch
xlm   = sum + secXLMc  , sum := xlm
eos   = sum + secEOSc  , sum := eos
xmr   = sum + secXMRc  , sum := xmr
trx   = sum + secTRXc  , sum := trx
bsv   = sum + secBSVc  , sum := bsv
miota = sum + secMIOTAc, sum := miota
oth   = sum + secOTHc  , sum := oth
usdt  = sum + secUSDTc , sum := usdt

// https://www.mathcelebrity.com/anglebasic.php?entry=78&pl=cos
c0_0  = 0.       // calculated sin(90 - 90) in degrees
c3_6  = 0.06279  // = 1%
c7_2  = 0.12533  // = 2%
c10_8 = 0.18738
c14_4 = 0.24869
c18_0 = 0.30902
c21_6 = 0.36812
c25_2 = 0.42578
c28_8 = 0.48175
c32_4 = 0.53583
c36_0 = 0.58779
c39_6 = 0.63742
c43_2 = 0.68455
c46_8 = 0.72897
c50_4 = 0.77051
c54_0 = 0.80902
c57_6 = 0.84433
c61_2 = 0.87631
c64_8 = 0.90483
c68_4 = 0.92978
c72_0 = 0.95106
c75_6 = 0.96858
c79_2 = 0.98229
c82_8 = 0.99211
c86_4 = 0.99803
c90_0 = 1.

s0_0  = c90_0
s3_6  = c86_4
s7_2  = c82_8
s10_8 = c79_2
s14_4 = c75_6
s18_0 = c72_0
s21_6 = c68_4
s25_2 = c64_8
s28_8 = c61_2
s32_4 = c57_6
s36_0 = c54_0
s39_6 = c50_4
s43_2 = c46_8
s46_8 = c43_2
s50_4 = c39_6
s54_0 = c36_0
s57_6 = c32_4
s61_2 = c28_8
s64_8 = c25_2
s68_4 = c21_6
s72_0 = c18_0
s75_6 = c14_4
s79_2 = c10_8
s82_8 = c7_2
s86_4 = c3_6
s90_0 = c0_0

// functions

barstateIsReallyLast = barstate.isrealtime and not barstate.isconfirmed

f_brst(index) => barstateIsReallyLast ? bar_index - math.round(index) : na

biX  = f_brst(rad)

x0   = f_brst(rad - rad * c0_0)
y0   = rad * s0_0
x1   = f_brst(rad - rad * c3_6)
y1   = rad * s3_6
x2   = f_brst(rad - rad * c7_2)
y2   = rad * s7_2
x3   = f_brst(rad - rad * c10_8)
y3   = rad * s10_8
x4   = f_brst(rad - rad * c14_4)
y4   = rad * s14_4
x5   = f_brst(rad - rad * c18_0)
y5   = rad * s18_0
x6   = f_brst(rad - rad * c21_6)
y6   = rad * s21_6
x7   = f_brst(rad - rad * c25_2)
y7   = rad * s25_2
x8   = f_brst(rad - rad * c28_8)
y8   = rad * s28_8
x9   = f_brst(rad - rad * c32_4)
y9   = rad * s32_4
x10  = f_brst(rad - rad * c36_0)
y10  = rad * s36_0
x11  = f_brst(rad - rad * c39_6)
y11  = rad * s39_6
x12  = f_brst(rad - rad * c43_2)
y12  = rad * s43_2
x13  = f_brst(rad - rad * c46_8)
y13  = rad * s46_8
x14  = f_brst(rad - rad * c50_4)
y14  = rad * s50_4
x15  = f_brst(rad - rad * c54_0)
y15  = rad * s54_0
x16  = f_brst(rad - rad * c57_6)
y16  = rad * s57_6
x17  = f_brst(rad - rad * c61_2)
y17  = rad * s61_2
x18  = f_brst(rad - rad * c64_8)
y18  = rad * s64_8
x19  = f_brst(rad - rad * c68_4)
y19  = rad * s68_4
x20  = f_brst(rad - rad * c72_0)
y20  = rad * s72_0
x21  = f_brst(rad - rad * c75_6)
y21  = rad * s75_6
x22  = f_brst(rad - rad * c79_2)
y22  = rad * s79_2
x23  = f_brst(rad - rad * c82_8)
y23  = rad * s82_8
x24  = f_brst(rad - rad * c86_4)
y24  = rad * s86_4
x25  = f_brst(rad - rad * c90_0)
y25  = rad * s90_0

x0L  = f_brst(rad + rad * c0_0)
x1L  = f_brst(rad + rad * c3_6)
x2L  = f_brst(rad + rad * c7_2)
x3L  = f_brst(rad + rad * c10_8)
x4L  = f_brst(rad + rad * c14_4)
x5L  = f_brst(rad + rad * c18_0)
x6L  = f_brst(rad + rad * c21_6)
x7L  = f_brst(rad + rad * c25_2)
x8L  = f_brst(rad + rad * c28_8)
x9L  = f_brst(rad + rad * c32_4)
x10L = f_brst(rad + rad * c36_0)
x11L = f_brst(rad + rad * c39_6)
x12L = f_brst(rad + rad * c43_2)
x13L = f_brst(rad + rad * c46_8)
x14L = f_brst(rad + rad * c50_4)
x15L = f_brst(rad + rad * c54_0)
x16L = f_brst(rad + rad * c57_6)
x17L = f_brst(rad + rad * c61_2)
x18L = f_brst(rad + rad * c64_8)
x19L = f_brst(rad + rad * c68_4)
x20L = f_brst(rad + rad * c72_0)
x21L = f_brst(rad + rad * c75_6)
x22L = f_brst(rad + rad * c79_2)
x23L = f_brst(rad + rad * c82_8)
x24L = f_brst(rad + rad * c86_4)
x25L = f_brst(rad + rad * c90_0)

// —————————— PineCoders MTF Selection Framework functions
f_resInMinutes() =>
    _resInMinutes = timeframe.multiplier * (timeframe.isseconds ? 1. / 60. : timeframe.isminutes ? 1. : timeframe.isdaily ? 1440. : timeframe.isweekly ? 10080. : timeframe.ismonthly ? 43800. : na)
    _resInMinutes

f_htfLabel(_txt, _y, _color, _offsetLabels) =>
    _t = int(time + f_resInMinutes() * _offsetLabels * 60000)
    var _lbl = label.new(_t, _y, _txt, xloc.bar_time, yloc.price, #00000000, label.style_none, color.gray, size.small)
    if barstateIsReallyLast
        label.set_xy(_lbl, _t, _y)
        label.set_text(_lbl, _txt)
        label.set_textcolor(_lbl, _color)

f_eqPerc(x, y) =>
    eq_ = math.round((math.max(x, y) / math.min(x, y) - 1) * 10000) / 100
    eq = x >= y ? eq_ : -eq_
    eq

f_X(x) =>
    posx = x >= 0 and x <= 25 ? x == 0 ? x0 : x == 1 ? x1 : x == 2 ? x2 : x == 3 ? x3 : x == 4 ? x4 : x == 5 ? x5 : x == 6 ? x6 : x == 7 ? x7 : x == 8 ? x8 : x == 9 ? x9 : x == 10 ? x10 : x == 11 ? x11 : x == 12 ? x12 : x == 13 ? x13 : x == 14 ? x14 : x == 15 ? x15 : x == 16 ? x16 : x == 17 ? x17 : x == 18 ? x18 : x == 19 ? x19 : x == 20 ? x20 : x == 21 ? x21 : x == 22 ? x22 : x == 23 ? x23 : x == 24 ? x24 : x == 25 ? x25 : na : x > 25 and x <= 50 ? x == 26 ? x24 : x == 27 ? x23 : x == 28 ? x22 : x == 29 ? x21 : x == 30 ? x20 : x == 31 ? x19 : x == 32 ? x18 : x == 33 ? x17 : x == 34 ? x16 : x == 35 ? x15 : x == 36 ? x14 : x == 37 ? x13 : x == 38 ? x12 : x == 39 ? x11 : x == 40 ? x10 : x == 41 ? x9 : x == 42 ? x8 : x == 43 ? x7 : x == 44 ? x6 : x == 45 ? x5 : x == 46 ? x4 : x == 47 ? x3 : x == 48 ? x2 : x == 49 ? x1 : x == 50 ? x0 : na : x > 50 and x <= 75 ? x == 51 ? x1L : x == 52 ? x2L : x == 53 ? x3L : x == 54 ? x4L : x == 55 ? x5L : x == 56 ? x6L : x == 57 ? x7L : x == 58 ? x8L : x == 59 ? x9L : x == 60 ? x10L : x == 61 ? x11L : x == 62 ? x12L : x == 63 ? x13L : x == 64 ? x14L : x == 65 ? x15L : x == 66 ? x16L : x == 67 ? x17L : x == 68 ? x18L : x == 69 ? x19L : x == 70 ? x20L : x == 71 ? x21L : x == 72 ? x22L : x == 73 ? x23L : x == 74 ? x24L : x == 75 ? x25L : na : x == 76 ? x24L : x == 77 ? x23L : x == 78 ? x22L : x == 79 ? x21L : x == 80 ? x20L : x == 81 ? x19L : x == 82 ? x18L : x == 83 ? x17L : x == 84 ? x16L : x == 85 ? x15L : x == 86 ? x14L : x == 87 ? x13L : x == 88 ? x12L : x == 89 ? x11L : x == 90 ? x10L : x == 91 ? x9L : x == 92 ? x8L : x == 93 ? x7L : x == 94 ? x6L : x == 95 ? x5L : x == 96 ? x4L : x == 97 ? x3L : x == 98 ? x2L : x == 99 ? x1L : na
    posx

f_Y(x) =>
    posy = x >= 0 and x <= 25 ? x == 0 ? y0 : x == 1 ? y1 : x == 2 ? y2 : x == 3 ? y3 : x == 4 ? y4 : x == 5 ? y5 : x == 6 ? y6 : x == 7 ? y7 : x == 8 ? y8 : x == 9 ? y9 : x == 10 ? y10 : x == 11 ? y11 : x == 12 ? y12 : x == 13 ? y13 : x == 14 ? y14 : x == 15 ? y15 : x == 16 ? y16 : x == 17 ? y17 : x == 18 ? y18 : x == 19 ? y19 : x == 20 ? y20 : x == 21 ? y21 : x == 22 ? y22 : x == 23 ? y23 : x == 24 ? y24 : x == 25 ? -y25 : na : x > 25 and x <= 50 ? x == 26 ? -y24 : x == 27 ? -y23 : x == 28 ? -y22 : x == 29 ? -y21 : x == 30 ? -y20 : x == 31 ? -y19 : x == 32 ? -y18 : x == 33 ? -y17 : x == 34 ? -y16 : x == 35 ? -y15 : x == 36 ? -y14 : x == 37 ? -y13 : x == 38 ? -y12 : x == 39 ? -y11 : x == 40 ? -y10 : x == 41 ? -y9 : x == 42 ? -y8 : x == 43 ? -y7 : x == 44 ? -y6 : x == 45 ? -y5 : x == 46 ? -y4 : x == 47 ? -y3 : x == 48 ? -y2 : x == 49 ? -y1 : x == 50 ? -y0 : na : x > 50 and x <= 75 ? x == 51 ? -y1 : x == 52 ? -y2 : x == 53 ? -y3 : x == 54 ? -y4 : x == 55 ? -y5 : x == 56 ? -y6 : x == 57 ? -y7 : x == 58 ? -y8 : x == 59 ? -y9 : x == 60 ? -y10 : x == 61 ? -y11 : x == 62 ? -y12 : x == 63 ? -y13 : x == 64 ? -y14 : x == 65 ? -y15 : x == 66 ? -y16 : x == 67 ? -y17 : x == 68 ? -y18 : x == 69 ? -y19 : x == 70 ? -y20 : x == 71 ? -y21 : x == 72 ? -y22 : x == 73 ? -y23 : x == 74 ? -y24 : x == 75 ? y25 : na : x == 76 ? y24 : x == 77 ? y23 : x == 78 ? y22 : x == 79 ? y21 : x == 80 ? y20 : x == 81 ? y19 : x == 82 ? y18 : x == 83 ? y17 : x == 84 ? y16 : x == 85 ? y15 : x == 86 ? y14 : x == 87 ? y13 : x == 88 ? y12 : x == 89 ? y11 : x == 90 ? y10 : x == 91 ? y9 : x == 92 ? y8 : x == 93 ? y7 : x == 94 ? y6 : x == 95 ? y5 : x == 96 ? y4 : x == 97 ? y3 : x == 98 ? y2 : x == 99 ? y1 : na
    posy

colChar(x) =>
    ticker = secBTCc
    ticker := btc >= x ? secBTCc : eth >= x ? secETHc : bnb >= x ? secBNBc : dot >= x ? secDOTc : ada >= x ? secADAc : xrp >= x ? secXRPc : ltc >= x ? secLTCc : link >= x ? secLINKc : bch >= x ? secBCHc : xlm >= x ? secXLMc : eos >= x ? secEOSc : xmr >= x ? secXMRc : trx >= x ? secTRXc : bsv >= x ? secBSVc : miota >= x ? secMIOTAc : oth >= x ? secOTHc : secUSDTc
    colch = ticker > ticker[1] ? color.lime : ticker < ticker[1] ? color.red : color.new(color.white, 50)
    colch

f_text(ticker, perc) =>
    text_1 = ticker + ' \n' + str.tostring(math.round(perc * 100) / 100) + ' \n(' + str.tostring(f_eqPerc(perc, perc[1])) + ')'
    text_1

f_textF(ticker, perc) =>
    text_2 = ticker + ' '   + str.tostring(math.round(perc * 100) / 100) + ' ('   + str.tostring(f_eqPerc(perc, perc[1])) + ')'
    text_2

f_col(ticker) => ticker > ticker[1] ? color.lime : color.red


xBTC   = f_X(math.round(btc))
yBTC   = f_Y(math.round(btc))
xETH   = f_X(math.round(eth))
yETH   = f_Y(math.round(eth))
xBNB   = f_X(math.round(bnb))
yBNB   = f_Y(math.round(bnb))
xDOT   = f_X(math.round(dot))
yDOT   = f_Y(math.round(dot))
xADA   = f_X(math.round(ada))
yADA   = f_Y(math.round(ada))
xXRP   = f_X(math.round(xrp))
yXRP   = f_Y(math.round(xrp))
xLTC   = f_X(math.round(ltc))
yLTC   = f_Y(math.round(ltc))
xLINK  = f_X(math.round(link))
yLINK  = f_Y(math.round(link))
xBCH   = f_X(math.round(bch))
yBCH   = f_Y(math.round(bch))
xXLM   = f_X(math.round(xlm))
yXLM   = f_Y(math.round(xlm))
xEOS   = f_X(math.round(eos))
yEOS   = f_Y(math.round(eos))
xXMR   = f_X(math.round(xmr))
yXMR   = f_Y(math.round(xmr))
xTRX   = f_X(math.round(trx))
yTRX   = f_Y(math.round(trx))
xBSV   = f_X(math.round(bsv))
yBSV   = f_Y(math.round(bsv))
xMIOTA = f_X(math.round(miota))
yMIOTA = f_Y(math.round(miota))
xOTH   = f_X(math.round(oth))
yOTH   = f_Y(math.round(oth))
xUSDT  = f_X(math.round(usdt))
yUSDT  = f_Y(math.round(usdt))

col = color.blue
//lzero = line.new(x1=x0    , y1=y0     , x2=biX , y2=0, color=col, style=line.style_solid, width=1), line.delete(lzero[1])

lbtc   = line.new(x1=xBTC  , y1=yBTC  , x2=biX, y2=0, color=col, style=line.style_solid, width=1), line.delete(lbtc  [1])
leth   = line.new(x1=xETH  , y1=yETH  , x2=biX, y2=0, color=col, style=line.style_solid, width=1), line.delete(leth  [1])
lbnb   = line.new(x1=xBNB  , y1=yBNB  , x2=biX, y2=0, color=col, style=line.style_solid, width=1), line.delete(lbnb  [1])
ldot   = line.new(x1=xDOT  , y1=yDOT  , x2=biX, y2=0, color=col, style=line.style_solid, width=1), line.delete(ldot  [1])
lada   = line.new(x1=xADA  , y1=yADA  , x2=biX, y2=0, color=col, style=line.style_solid, width=1), line.delete(lada  [1])
lxrp   = line.new(x1=xXRP  , y1=yXRP  , x2=biX, y2=0, color=col, style=line.style_solid, width=1), line.delete(lxrp  [1])
lltc   = line.new(x1=xLTC  , y1=yLTC  , x2=biX, y2=0, color=col, style=line.style_solid, width=1), line.delete(lltc  [1])
llink  = line.new(x1=xLINK , y1=yLINK , x2=biX, y2=0, color=col, style=line.style_solid, width=1), line.delete(llink [1])
lbch   = line.new(x1=xBCH  , y1=yBCH  , x2=biX, y2=0, color=col, style=line.style_solid, width=1), line.delete(lbch  [1])
lxlm   = line.new(x1=xXLM  , y1=yXLM  , x2=biX, y2=0, color=col, style=line.style_solid, width=1), line.delete(lxlm  [1])
leos   = line.new(x1=xEOS  , y1=yEOS  , x2=biX, y2=0, color=col, style=line.style_solid, width=1), line.delete(leos  [1])
lxmr   = line.new(x1=xXMR  , y1=yXMR  , x2=biX, y2=0, color=col, style=line.style_solid, width=1), line.delete(lxmr  [1])
ltrx   = line.new(x1=xTRX  , y1=yTRX  , x2=biX, y2=0, color=col, style=line.style_solid, width=1), line.delete(ltrx  [1])
lbsv   = line.new(x1=xBSV  , y1=yBSV  , x2=biX, y2=0, color=col, style=line.style_solid, width=1), line.delete(lbsv  [1])
lmiota = line.new(x1=xMIOTA, y1=yMIOTA, x2=biX, y2=0, color=col, style=line.style_solid, width=1), line.delete(lmiota[1])
loth   = line.new(x1=xOTH  , y1=yOTH  , x2=biX, y2=0, color=col, style=line.style_solid, width=1), line.delete(loth  [1])
lusdt  = line.new(x1=xUSDT , y1=yUSDT , x2=biX, y2=0, color=col, style=line.style_solid, width=1), line.delete(lusdt [1])

plot( rad * 1.1, color=color.new(color.black, 100))
plot(-rad * 1.1, color=color.new(color.black, 100))

label.new(x=x5, y=y25, text=f_textF('BTC', secBTCc), size=size.small, textcolor=f_col(secBTCc), style=label.style_none)
label.new(x=xETH + 14, y=yETH - 10, text=f_textF('ETH', secETHc), size=size.small, textcolor=f_col(secETHc), style=label.style_none)
label.new(x=xBNB - 10, y=yBNB - 4, text=f_textF('BNB', secBNBc), size=size.small, textcolor=f_col(secBNBc), style=label.style_none)
label.new(x=xDOT - 12, y=yDOT - 3, text=f_textF('DOT', secDOTc), size=size.small, textcolor=f_col(secDOTc), style=label.style_none)
label.new(x=xADA - 13, y=yADA - 3, text=f_textF('ADA', secADAc), size=size.small, textcolor=f_col(secADAc), style=label.style_none)
label.new(x=x25L - 24, y=y20, text=f_textF('XRP', secXRPc), size=size.small, textcolor=f_col(secXRPc), style=label.style_none)
label.new(x=x25L - 24, y=y18, text=f_textF('LTC', secLTCc), size=size.small, textcolor=f_col(secLTCc), style=label.style_none)
label.new(x=x25L - 24, y=y16, text=f_textF('LINK', secLINKc), size=size.small, textcolor=f_col(secLINKc), style=label.style_none)
label.new(x=x25L - 24, y=y14, text=f_textF('BCH', secBCHc), size=size.small, textcolor=f_col(secBCHc), style=label.style_none)
label.new(x=x25L - 24, y=y12, text=f_textF('XLM', secXLMc), size=size.small, textcolor=f_col(secXLMc), style=label.style_none)
label.new(x=x25L - 24, y=y10, text=f_textF('EOS', secEOSc), size=size.small, textcolor=f_col(secEOSc), style=label.style_none)
label.new(x=x25L - 24, y=y6, text=f_textF('XMR', secXMRc), size=size.small, textcolor=f_col(secXMRc), style=label.style_none)
label.new(x=x25L - 24, y=y0, text=f_textF('TRX', secTRXc), size=size.small, textcolor=f_col(secTRXc), style=label.style_none)
label.new(x=x25L - 24, y=y0 + 3, text=f_textF('BSV', secBSVc), size=size.small, textcolor=f_col(secBSVc), style=label.style_none)
label.new(x=x25L - 24, y=y0 + 6, text=f_textF('MIOTA', secMIOTAc), size=size.small, textcolor=f_col(secMIOTAc), style=label.style_none)

label.new(x=xUSDT - 1, y=yUSDT + 3, text=f_text('USDT', secUSDTc), size=size.small, textcolor=f_col(secUSDTc), style=label.style_none)
label.new(x=xOTH - 15, y=yOTH, text=f_text('OTHER', secOTHc), size=size.small, textcolor=f_col(secOTHc), style=label.style_none)

line.new(x1=x25L - 15, y1=y20, x2=x25L - 10, y2=y20, color=f_col(secXRPc), style=line.style_solid, width=1)
line.new(x1=x25L - 10, y1=y20, x2=x25L - 1, y2=yXRP, color=f_col(secXRPc), style=line.style_solid, width=1)
line.new(x1=x25L - 1, y1=yXRP, x2=xXRP - 1, y2=yXRP, color=f_col(secXRPc), style=line.style_solid, width=1)

line.new(x1=x25L - 15, y1=y18, x2=x25L - 10, y2=y18, color=f_col(secLTCc), style=line.style_solid, width=1)
line.new(x1=x25L - 10, y1=y18, x2=x25L - 1, y2=yLTC, color=f_col(secLTCc), style=line.style_solid, width=1)
line.new(x1=x25L - 1, y1=yLTC, x2=xLTC - 1, y2=yLTC, color=f_col(secLTCc), style=line.style_solid, width=1)

line.new(x1=x25L - 15, y1=y16, x2=x25L - 10, y2=y16, color=f_col(secLINKc), style=line.style_solid, width=1)
line.new(x1=x25L - 10, y1=y16, x2=x25L - 1, y2=yLINK, color=f_col(secLINKc), style=line.style_solid, width=1)
line.new(x1=x25L - 1, y1=yLINK, x2=xLINK - 1, y2=yLINK, color=f_col(secLINKc), style=line.style_solid, width=1)

line.new(x1=x25L - 15, y1=y14, x2=x25L - 10, y2=y14, color=f_col(secBCHc), style=line.style_solid, width=1)
line.new(x1=x25L - 10, y1=y14, x2=x25L - 1, y2=yBCH, color=f_col(secBCHc), style=line.style_solid, width=1)
line.new(x1=x25L - 1, y1=yBCH, x2=xBCH - 1, y2=yBCH, color=f_col(secBCHc), style=line.style_solid, width=1)

line.new(x1=x25L - 15, y1=y12, x2=x25L - 10, y2=y12, color=f_col(secXLMc), style=line.style_solid, width=1)
line.new(x1=x25L - 10, y1=y12, x2=x25L - 1, y2=yXLM, color=f_col(secXLMc), style=line.style_solid, width=1)
line.new(x1=x25L - 1, y1=yXLM, x2=xXLM - 1, y2=yXLM, color=f_col(secXLMc), style=line.style_solid, width=1)

line.new(x1=x25L - 15, y1=y10, x2=x25L - 10, y2=y10, color=f_col(secEOSc), style=line.style_solid, width=1)
line.new(x1=x25L - 10, y1=y10, x2=x25L - 1, y2=yEOS, color=f_col(secEOSc), style=line.style_solid, width=1)
line.new(x1=x25L - 1, y1=yEOS, x2=xEOS - 1, y2=yEOS, color=f_col(secEOSc), style=line.style_solid, width=1)

line.new(x1=x25L - 15, y1=y6, x2=x25L - 10, y2=y6, color=f_col(secXMRc), style=line.style_solid, width=1)
line.new(x1=x25L - 10, y1=y6, x2=x25L - 1, y2=yXMR, color=f_col(secXMRc), style=line.style_solid, width=1)
line.new(x1=x25L - 1, y1=yXMR, x2=xXMR - 1, y2=yXMR, color=f_col(secXMRc), style=line.style_solid, width=1)

line.new(x1=x25L - 15, y1=y0, x2=x25L - 10, y2=y0, color=f_col(secTRXc), style=line.style_solid, width=1)
line.new(x1=x25L - 10, y1=y0, x2=x25L - 1, y2=yTRX, color=f_col(secTRXc), style=line.style_solid, width=1)
line.new(x1=x25L - 1, y1=yTRX, x2=xTRX - 1, y2=yTRX, color=f_col(secTRXc), style=line.style_solid, width=1)

line.new(x1=x25L - 15, y1=y0 + 3, x2=x25L - 10, y2=y0 + 3, color=f_col(secBSVc), style=line.style_solid, width=1)
line.new(x1=x25L - 10, y1=y0 + 3, x2=x25L - 1, y2=yBSV, color=f_col(secBSVc), style=line.style_solid, width=1)
line.new(x1=x25L - 1, y1=yBSV, x2=xBSV - 1, y2=yBSV, color=f_col(secBSVc), style=line.style_solid, width=1)

line.new(x1=x25L - 15, y1=y0 + 6, x2=x25L - 10, y2=y0 + 6, color=f_col(secMIOTAc), style=line.style_solid, width=1)
line.new(x1=x25L - 10, y1=y0 + 6, x2=x25L - 1, y2=yMIOTA, color=f_col(secMIOTAc), style=line.style_solid, width=1)
line.new(x1=x25L - 1, y1=yMIOTA, x2=xMIOTA - 1, y2=yMIOTA, color=f_col(secMIOTAc), style=line.style_solid, width=1)

//label.new(x=xBNB - 7, y= yBNB  , text= tostring(round(bsv*100)/100), size=size.small, textcolor=color.white, style=label.style_none) 
//label.new(x=xBNB - 7, y= yBNB+2, text= tostring(round(miota*100)/100), size=size.small, textcolor=color.white, style=label.style_none) 
//label.new(x=xBNB - 7, y= yBNB+4, text= tostring(round(usdt*100)/100), size=size.small, textcolor=color.white, style=label.style_none) 

//label.new(x=xDh, y= yDh, text=tostring(hours)  , size=size.small, textcolor=color.lime, style=label.style_none) 

_x0 = math.round(rad - rad * c0_0)  // 0%
_x1 = math.round(rad - rad * c3_6)  // 1%
_x2 = math.round(rad - rad * c7_2)  // 2%
_x3 = math.round(rad - rad * c10_8)  // 3%
_x4 = math.round(rad - rad * c14_4)
_x5 = math.round(rad - rad * c18_0)
_x6 = math.round(rad - rad * c21_6)
_x7 = math.round(rad - rad * c25_2)
_x8 = math.round(rad - rad * c28_8)
_x9 = math.round(rad - rad * c32_4)
_x10 = math.round(rad - rad * c36_0)
_x11 = math.round(rad - rad * c39_6)
_x12 = math.round(rad - rad * c43_2)
_x13 = math.round(rad - rad * c46_8)
_x14 = math.round(rad - rad * c50_4)
_x15 = math.round(rad - rad * c54_0)
_x16 = math.round(rad - rad * c57_6)
_x17 = math.round(rad - rad * c61_2)
_x18 = math.round(rad - rad * c64_8)
_x19 = math.round(rad - rad * c68_4)
_x20 = math.round(rad - rad * c72_0)
_x21 = math.round(rad - rad * c75_6)
_x22 = math.round(rad - rad * c79_2)
_x23 = math.round(rad - rad * c82_8)
_x24 = math.round(rad - rad * c86_4)
_x25 = math.round(rad - rad * c90_0)

_x51 = math.round(rad + rad * c3_6)  // 51%
_x52 = math.round(rad + rad * c7_2)  // 52%
_x53 = math.round(rad + rad * c10_8)  // 53%
_x54 = math.round(rad + rad * c14_4)
_x55 = math.round(rad + rad * c18_0)
_x56 = math.round(rad + rad * c21_6)
_x57 = math.round(rad + rad * c25_2)
_x58 = math.round(rad + rad * c28_8)
_x59 = math.round(rad + rad * c32_4)
_x60 = math.round(rad + rad * c36_0)
_x61 = math.round(rad + rad * c39_6)
_x62 = math.round(rad + rad * c43_2)
_x63 = math.round(rad + rad * c46_8)
_x64 = math.round(rad + rad * c50_4)
_x65 = math.round(rad + rad * c54_0)
_x66 = math.round(rad + rad * c57_6)
_x67 = math.round(rad + rad * c61_2)
_x68 = math.round(rad + rad * c64_8)
_x69 = math.round(rad + rad * c68_4)
_x70 = math.round(rad + rad * c72_0)
_x71 = math.round(rad + rad * c75_6)
_x72 = math.round(rad + rad * c79_2)
_x73 = math.round(rad + rad * c82_8)
_x74 = math.round(rad + rad * c86_4)
_x75 = math.round(rad + rad * c90_0)

_x0_ = math.round(rad + rad * c0_0)
_x1_ = math.round(rad + rad * c3_6)
_x2_ = math.round(rad + rad * c7_2)
_x3_ = math.round(rad + rad * c10_8)

col0 = colChar(0)
col4 = colChar(4)
col8 = colChar(8)
col12 = colChar(12)
col16 = colChar(16)
col20 = colChar(20)
col24 = colChar(24)
col28 = colChar(28)
col32 = colChar(32)
col36 = colChar(36)
col40 = colChar(40)
col44 = colChar(44)
col48 = colChar(48)
col52 = colChar(52)

col53 = colChar(53)
col56 = colChar(56)
col59 = colChar(59)
col62 = colChar(62)
col65 = colChar(65)
col68 = colChar(68)
col71 = colChar(71)
col74 = colChar(74)
col76 = colChar(76)
col79 = colChar(79)
col82 = colChar(82)
col85 = colChar(85)
col88 = colChar(88)
col91 = colChar(91)
col94 = colChar(94)
col97 = colChar(97)

// ● ° ☀︎

char = '●'

plotchar(barstateIsReallyLast ? y0 : na, char=char, location=location.absolute, size=size.tiny, color=col0, offset=-_x0)
plotchar(barstateIsReallyLast ? y4 : na, char=char, location=location.absolute, size=size.tiny, color=col4, offset=-_x4)
plotchar(barstateIsReallyLast ? y8 : na, char=char, location=location.absolute, size=size.tiny, color=col8, offset=-_x8)
plotchar(barstateIsReallyLast ? y12 : na, char=char, location=location.absolute, size=size.tiny, color=col12, offset=-_x12)
plotchar(barstateIsReallyLast ? y16 : na, char=char, location=location.absolute, size=size.tiny, color=col16, offset=-_x16)
plotchar(barstateIsReallyLast ? y20 : na, char=char, location=location.absolute, size=size.tiny, color=col20, offset=-_x20)
plotchar(barstateIsReallyLast ? y24 : na, char=char, location=location.absolute, size=size.tiny, color=col24, offset=-_x24)
plotchar(barstateIsReallyLast ? -y22 : na, char=char, location=location.absolute, size=size.tiny, color=col28, offset=-_x22)
plotchar(barstateIsReallyLast ? -y18 : na, char=char, location=location.absolute, size=size.tiny, color=col32, offset=-_x18)
plotchar(barstateIsReallyLast ? -y14 : na, char=char, location=location.absolute, size=size.tiny, color=col36, offset=-_x14)
plotchar(barstateIsReallyLast ? -y10 : na, char=char, location=location.absolute, size=size.tiny, color=col40, offset=-_x10)
plotchar(barstateIsReallyLast ? -y6 : na, char=char, location=location.absolute, size=size.tiny, color=col44, offset=-_x6)
plotchar(barstateIsReallyLast ? -y2 : na, char=char, location=location.absolute, size=size.tiny, color=col48, offset=-_x2)
plotchar(barstateIsReallyLast ? -y2 : na, char=char, location=location.absolute, size=size.tiny, color=col52, offset=-_x52)

plotchar(barstateIsReallyLast ? -y6 : na, char=char, location=location.absolute, size=size.tiny, color=col56, offset=-_x56)
plotchar(barstateIsReallyLast ? -y9 : na, char=char, location=location.absolute, size=size.tiny, color=col59, offset=-_x59)
plotchar(barstateIsReallyLast ? -y12 : na, char=char, location=location.absolute, size=size.tiny, color=col62, offset=-_x62)
plotchar(barstateIsReallyLast ? -y15 : na, char=char, location=location.absolute, size=size.tiny, color=col65, offset=-_x65)
plotchar(barstateIsReallyLast ? -y18 : na, char=char, location=location.absolute, size=size.tiny, color=col68, offset=-_x68)
plotchar(barstateIsReallyLast ? -y21 : na, char=char, location=location.absolute, size=size.tiny, color=col71, offset=-_x71)
plotchar(barstateIsReallyLast ? -y24 : na, char=char, location=location.absolute, size=size.tiny, color=col74, offset=-_x74)
plotchar(barstateIsReallyLast ? y24 : na, char=char, location=location.absolute, size=size.tiny, color=col76, offset=-_x74)
plotchar(barstateIsReallyLast ? y21 : na, char=char, location=location.absolute, size=size.tiny, color=col79, offset=-_x71)
plotchar(barstateIsReallyLast ? y18 : na, char=char, location=location.absolute, size=size.tiny, color=col82, offset=-_x68)
plotchar(barstateIsReallyLast ? y15 : na, char=char, location=location.absolute, size=size.tiny, color=col85, offset=-_x65)
plotchar(barstateIsReallyLast ? y12 : na, char=char, location=location.absolute, size=size.tiny, color=col88, offset=-_x62)
plotchar(barstateIsReallyLast ? y9 : na, char=char, location=location.absolute, size=size.tiny, color=col91, offset=-_x59)
plotchar(barstateIsReallyLast ? y6 : na, char=char, location=location.absolute, size=size.tiny, color=col94, offset=-_x56)
plotchar(barstateIsReallyLast ? y3 : na, char=char, location=location.absolute, size=size.tiny, color=col97, offset=-_x53)

//line.new(x1=x24L, y1=-y24  , x2=biX , y2=0, color=color.white, style=line.style_solid, width=1)
//line.new(x1=x25L, y1=-y25  , x2=biX , y2=0, color=color.red, style=line.style_solid, width=1)

Overview

Dominance Pie Chart requests CRYPTOCAP close values for Bitcoin, Ethereum, several major altcoins, Tether, and the others bucket, then accumulates those shares into wedge angles. Precomputed sine and cosine values place the sector outlines. No user inputs are defined, and it does not generate trade entries, exits, or risk rules. The chart follows the current chart timeframe.

Details

Published by

regalouisei on GitHub

Code credit

fikira, as written in the script's header

Type

Indicator, Pine Script v5

Draws

Separate pane below the chart

Category

Screeners & dashboards

Markets

Crypto

Timeframes

Any timeframe

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.

Similar Pine Scripts

948 stars

This indicator measures the chart symbol’s percentage change from the opening price at the start of each US presidential term and plots those values as histogram columns in a separate pane. Columns are offset so each administration appears separately, with a s

Indicator v6 Screeners & dashboards
Updated 10 days ago · GPL-3.0 GitHub repository of Presidents Performance

This indicator scans a pasted list of symbols for RSI directional momentum and shows matching long and short signals in a table in a separate pane. The user chooses continuous break, continuous retracement, flip break, flip retracement, divergence, or hidden d

Indicator v6 Oscillators & momentumDivergence
Updated 1 year ago · MPL-2.0 GitHub repository of Momentum Setup - RSI Directional Momentum Scanner

Tables-001

by ricardosantos79
261 stars

This indicator builds a TradingView table in a separate pane and fills its cells with fixed placeholder text according to whether each row and column index is even or odd. Users set the table position, the number of rows and columns, and the background, frame,

Indicator v4 Screeners & dashboards
Updated 4 years ago · None stated GitHub repository of Tables-001
257 stars

Donald SPX - Options Trading is an indicator designed to assist SPX index option traders by tracking session benchmarks and multi-timeframe moving average data. It calculates a 200-period weighted moving average (WMA) and requests multi-timeframe bar data from

Indicator v5 Moving averagesScreeners & dashboards Repaints
Updated 6 weeks ago · None stated GitHub repository of Donald SPX - Options Trading

Index Member Distribution

by TradersPost
218 stars

Calculates and plots a weighted histogram of constituent returns for major market indices (NDX, SPX, DJIA, and RUT) in a separate pane. Each histogram bin reflects the summed weights of members within that percentage return bracket. The script renders vertical

Indicator v6 Screeners & dashboards
Updated 3 months ago · None stated GitHub repository of Index Member Distribution

KamaFama

by Mastaaa1987
141 stars

KamaFama is an indicator that translates a Freqtrade trading strategy into Pine Script for visualization. It combines Kaufman Adaptive Moving Average (KAMA), MAMA/FAMA calculations derived via Hilbert Transform, Williams %R, and correlation trend filters to ev

Indicator v6 Moving averagesOscillators & momentum
Updated 6 weeks ago · MIT GitHub repository of KamaFama

More indicators

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers