741 GME vs AMC
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Nyanderfull
// @version=4
study("741 GME vs AMC", max_labels_count=100)

//Input / Colors and Base lines
plot_lineWidth  = input(1, " Line Width", input.integer, minval=1, maxval=11 )
p1 = plot(0, title="Baseline", linewidth = 0, color=#00000000, display=display.none)
hline(0,color=#FFFFFF35,linestyle=hline.style_solid)

/////Securities
GME =       security("GME",     timeframe.period,   close) 
AMC =       security("AMC",     timeframe.period,   close) *7
Average =   (GME + AMC) / 2
Difference = GME - AMC

/////Input / Colors
GME_Color =         input(title="GME",          type=input.color,   defval=#00FF00)
AMC_Color =         input(title="AMC",          type=input.color,   defval=#FF0000)
Average_Color =     input(title="Difference",   type=input.color,   defval=#0077FF55)

/////Plots
GME_Plot =          plot(GME,           title="GME",        color=GME_Color,        linewidth = plot_lineWidth,     display=display.all) 
AMC_Plot =          plot(AMC,           title="AMC",        color=AMC_Color,        linewidth = plot_lineWidth,     display=display.all)   
Average_Plot =      plot(Average,       title="Average",    color=Average_Color,    linewidth = plot_lineWidth,     display=display.all)  
Difference_Plot =   plot(Difference,    title="Difference",     linewidth = plot_lineWidth,     display=display.all)  

fill(GME_Plot, AMC_Plot, color=color.rgb(255,255,77,95))
fill(p1, Difference_Plot, color=color.blue)