OPEN-SOURCE SCRIPT
CHPY vs Semiconductor Sector Comparison

//version=5
indicator("CHPY vs Semiconductor Sector Comparison", overlay=false, timeframe="W")
// CHPY
chpy = request.security("CHPY", "W", close)
plot((chpy/chpy[1]-1)*100, color=color.new(color.blue,0), title="CHPY")
// SOXX (Semiconductor Index ETF)
soxx = request.security("SOXX", "W", close)
plot((soxx/soxx[1]-1)*100, color=color.new(color.red,0), title="SOXX")
// SMH (Semiconductor ETF)
smh = request.security("SMH", "W", close)
plot((smh/smh[1]-1)*100, color=color.new(color.green,0), title="SMH")
// NVDA
nvda = request.security("NVDA", "W", close)
plot((nvda/nvda[1]-1)*100, color=color.new(color.orange,0), title="NVDA")
// AVGO
avgo = request.security("AVGO", "W", close)
plot((avgo/avgo[1]-1)*100, color=color.new(color.purple,0), title="AVGO")
indicator("CHPY vs Semiconductor Sector Comparison", overlay=false, timeframe="W")
// CHPY
chpy = request.security("CHPY", "W", close)
plot((chpy/chpy[1]-1)*100, color=color.new(color.blue,0), title="CHPY")
// SOXX (Semiconductor Index ETF)
soxx = request.security("SOXX", "W", close)
plot((soxx/soxx[1]-1)*100, color=color.new(color.red,0), title="SOXX")
// SMH (Semiconductor ETF)
smh = request.security("SMH", "W", close)
plot((smh/smh[1]-1)*100, color=color.new(color.green,0), title="SMH")
// NVDA
nvda = request.security("NVDA", "W", close)
plot((nvda/nvda[1]-1)*100, color=color.new(color.orange,0), title="NVDA")
// AVGO
avgo = request.security("AVGO", "W", close)
plot((avgo/avgo[1]-1)*100, color=color.new(color.purple,0), title="AVGO")
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.