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

//@version=5
indicator("The Rush", overlay=false)
var oldvrb=0.0
var oldvrs=0.0
var data=0.0
var datas=0.0
vr=0.0
vrp=0.0
dif=0.0
avg=0.0
difv=0.0
avgv=0.0
fast = 25, slow = 52
fastMA = ta.sma(close, fast)
slowMA = ta.sma(close, slow)
if (open<open[1])
    dif:=(open-open[1])
    avg:=(open+open[1])/2
    difv:=math.abs(volume-volume[1])
    avgv:=(volume+volume[1])/2
//incr=(dif/volume[1])//*100
incr=(dif/avg)*100
incrv=(difv/avgv)*100
if (open>close and open<open[1])// and fastMA>slowMA)// and incr>=100)
    vr:=(incrv/incr)
    
if (vr<0.0 and oldvrs>vr and oldvrs<0.0)
    datas:=datas-25
    
else
    datas:=0.0
  
//plotshape(vr, style=shape.triangleup)    
//plot(vr)
plot(datas, "Heavy Bears selling", color.red, 4, plot.style_columns)
oldvrs:=vr
//plotshape(vr, style=shape.triangleup)
vrb=0.0
if (open>open[1])
    dif:=(open-open[1])//math.abs
    avg:=(open+open[1])/2
    difv:=math.abs(volume-volume[1])
    avgv:=(volume+volume[1])/2
//incrb=(dif/volume[1])//*100
incrb=(dif/avg)*100
incrbv=(difv/avgv)*100
if (open<close and open>open[1])// and fastMA<slowMA)// and incrb>=100)
    vrb:=(incrbv/incrb)
    
if (vrb>0.0 and oldvrb<vrb and oldvrb>0.0)
    data:=data+25
    
else
    data:=0.0


//plotshape(data, style=shape.triangleup)
  

plot(data, "Heavy Bulls buying", color.green, 4, plot.style_columns)


oldvrb:=vrb   