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

//@version=4
study("Summary Checklist")

hivol10=highest(volume,10)
//percentage of relative volume 
pcnt=(volume/(sma(volume,50)))*100

// ATR comparison for Buyable Gap Up
is_upsidegap_valid = if((open > close[1]+atr(40)*0.75 ) and (volume / sma(volume,50)) > 1.5)
    true 
else 
    false
    
is_price_over50 = if (close >= sma(close,50))
    true
else
    false

is_ma50_great_ma200 = if (sma(close,50) >= sma(close,200))
    true    
else
    false
is_time_sessiontime = if (timenow<time_close)
    true
else
    false
    
//projected volume and relative projected volume calculation
volume_projected = ((time_close-timenow)*volume/(23400000-(time_close-timenow))+volume)/1000000
b=sma(volume,50)
a = volume_projected*1000000/b
is_volume_projected =   if (a > 1 )
    true
else    
    false 
    


text_= '==== TECHNICAL SUMMARY ==== \n \n'
text_ := text_ + '50 Day Average Volume = ' + tostring(b/1000000,'#.##') + 'M\n'
text_ := text_+ 'Current Day Volume = '+ tostring(volume/1000000,'#.##') + 'M \n'
text_ := text_ + 'Relative Volume = ' + tostring(pcnt,'#.##') + '% \n'
text_ := text_ + '\nIs it a Buyable Gap-up?' + (is_upsidegap_valid ? ' Yes\n  ATR multiple is : ' : ' No \n  ATR multiple is : ') + tostring((open-close[1])/atr(40),"#.##") + "\n"
text_ := text_ + "Volume Multiple is : " +tostring(volume/b,'#.##')
text_ := text_ + "\n \n Is Price Consolidating over 50SMA? " + (is_price_over50 ? 'Yes' : 'No')
text_ := text_ + "\n \n 50ma above 200ma? " + (is_ma50_great_ma200 ? 'Yes' : 'No') + "\n"
text_ := text_ + "Intraday Range is " + tostring((close-low)/(high-low)*100,"#.##") + " % \n\n" 
text_ := text_ + " Projected Volume =  " + (is_time_sessiontime ?  tostring(volume_projected,"#.##") + "M \n" : " Session is over.\n")
text_ := text_ + "Relative Projection = "  + (is_time_sessiontime ? tostring((is_volume_projected ? a*100 : a*100),"#.##") + "% \n" : " Session is over ")

bars_right = input(60, "x bars right", input.integer)                                       
position = input(close, "Label position", input.source)                                     
one_color = input(false, "Label only in one color", input.bool)                         
lab_color = input(#ffd010, "Label color", input.color)  
text_color = input(color.black,"Text color",input.color)
t = timenow + round(change(time)*bars_right)
var label lab = na, label.delete(lab), lab := label.new(t, position, text = text_, style=label.style_label_center, yloc=yloc.price, xloc=xloc.bar_time, textalign=text.align_center, color=lab_color, textcolor=text_color )


