TotalCustom
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © AJMourot

//@version=5
indicator("TotalCustom", overlay=true, scale=scale.left)

// Fetching MarketCap of each symbol:
MC_CAKE = request.security("CAKE", timeframe.period, close)
MC_ADA = request.security("ADA", timeframe.period, close)
MC_DOT = request.security("DOT", timeframe.period, close)
MC_UNI = request.security("UNI", timeframe.period, close)
MC_SOL = request.security("SOL", timeframe.period, close)
MC_DOGE = request.security("DOGE", timeframe.period, close)
MC_1INCH = request.security("1INCH", timeframe.period, close)
MC_JOE = request.security("JOE", timeframe.period, close)
MC_MATIC = request.security("MATIC", timeframe.period, close)
MC_XRP = request.security("XRP", timeframe.period, close)
MC_BNB = request.security("BNB", timeframe.period, close)
MC_AVAX = request.security("AVAX", timeframe.period, close)
MC_DYDX = request.security("DYDX", timeframe.period, close)
MC_CRV = request.security("CRV", timeframe.period, close)
MC_XMR = request.security("XMR", timeframe.period, close)
MC_LDO = request.security("LDO", timeframe.period, close)
MC_COMP = request.security("COMP", timeframe.period, close)
MC_AAVE = request.security("AAVE", timeframe.period, close)
MC_ICP = request.security("ICP", timeframe.period, close)
MC_LQTY = request.security("LQTY", timeframe.period, close)
MC_SUSHI = request.security("SUSHI", timeframe.period, close)
MC_APTO = request.security("APTO", timeframe.period, close)
MC_OP = request.security("OP", timeframe.period, close)
MC_ARBI = request.security("ARBI", timeframe.period, close)

// Summing up the prices
sumMarketcap = MC_CAKE + MC_ADA + MC_DOT + MC_UNI + MC_SOL + MC_DOGE + MC_1INCH + MC_JOE + MC_MATIC + MC_XRP + MC_BNB + MC_AVAX + MC_DYDX + MC_CRV + MC_XMR + MC_COMP + MC_AAVE + MC_ICP + MC_SUSHI

// Plotting the sum
plot(sumMarketcap, title="TotalCustom", color=color.blue)