Futures Volume GBPUSD pair cross using CME Futures Volume
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)