Top 5 Power Momentum Indicator
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/

//@version=5

indicator("Top 5 Power Momentum Indicator")

resu = input.timeframe("","Timeframe")

sym1 = input.symbol("AAPL","Ticker 1",group="Symbol")

sym2 = input.symbol("AMZN","Ticker 2",group="Symbol")

sym3 = input.symbol("TSLA","Ticker 3",group="Symbol")

sym4 = input.symbol("MSFT","Ticker 4",group="Symbol")

sym5 = input.symbol("GOOGL","Ticker 5",group="Symbol")

[price1,price2] = request.security(sym1 , resu , [close[1],close],gaps=barmerge.gaps_off,lookahead=barmerge.lookahead_on)

[price3,price4] = request.security(sym2 , resu , [close[1],close],gaps=barmerge.gaps_off,lookahead=barmerge.lookahead_on)

[price5,price6] = request.security(sym3 , resu , [close[1],close],gaps=barmerge.gaps_off,lookahead=barmerge.lookahead_on)

[price7,price8] = request.security(sym4 , resu , [close[1],close],gaps=barmerge.gaps_off,lookahead=barmerge.lookahead_on)

[price9,price10]= request.security(sym5 , resu , [close[1],close],gaps=barmerge.gaps_off,lookahead=barmerge.lookahead_on)

PercentChg3 = ((price2 - price1)+ (price4 - price3)+ (price6 - price5)+ (price8 - price7)+ (price10 - price9))/(price1+price3+price5+price7+price9)*100

plot(0)

plot(PercentChg3,style=plot.style_columns,color=PercentChg3>0 ? color.lime : color.red )