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

//@version=4
study("DrNon_NASDAQ10", shorttitle="NASDAQ10", overlay=false)

// Define the individual securities in the index
security1 = security("NASDAQ:AAPL", timeframe.period, close)
security2 = security("NASDAQ:MSFT", timeframe.period, close)
security3 = security("NASDAQ:GOOG", timeframe.period, close)
security4 = security("NASDAQ:AMZN", timeframe.period, close)
security5 = security("NASDAQ:NVDA", timeframe.period, close)
security6 = security("NASDAQ:TSLA", timeframe.period, close)
security7 = security("NASDAQ:META", timeframe.period, close)
security8 = security("NASDAQ:AVGO", timeframe.period, close)
security9 = security("NASDAQ:PEP", timeframe.period, close)
security10 = security("NASDAQ:COST", timeframe.period, close)

// Calculate the index value
indexValue = security1 + security2 + security3 + security4 + security5 + security6 + security7 + security8 + security9 + security10

// Plotting the index value
plot(indexValue, title="Custom Index", color=color.blue, linewidth=2)
