YipYip

Volume+ (GBPUSD futures)

Futures Volume GBPUSD pair cross using CME Futures Volume

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Disclaimer

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.

Want to use this script on a chart?
study("Volume+ (GBPUSD futures)", shorttitle="Volume: GBPUSD futures", overlay=false)
 
Symb  = input(defval="CME:M6B1!", type = string, title="GBPUSD")
 
Transpa = input(30, title="Bar transparency", minval =0, maxval=100)
Inv = input(defval=false, type = bool, title="Invert Horizontally?")
lookback=input(10)
showMA=input(false)
lengthMA=input(20)
 
 
 
Sec=Symb
p2  = security(Sec, period, close)
o2 = security(Sec, period, open)
v2  = security(Sec, period, volume)
//p2=close
//v2=volume
//o2=open
 
 
o1=o2[lookback]
p1=p2[lookback]
v1=v2[lookback]
 
c=      iff(o2<p2 and v2>sma(v2, lengthMA)*1.25, teal,
        iff(o2<p2 and v2<sma(v2, lengthMA)*1.25, teal,
        iff(o2>p2 and v2>sma(v2, lengthMA)*1.25, red,
        iff(o2>p2 and v2<sma(v2, lengthMA)*1.25, red, gray))))
plot(Inv? -v2 : v2, style=columns, color=c, transp=Transpa)
plot(showMA?sma(v2, lengthMA):na, color=maroon)