Greetings trading brothers! 
I'm back after two months of inactivity
4
Please suggest a simple & effective Method/System of "Trading System" Forum to newbie 182 replies
HYBRID: trading system within a trading system 31 replies
Day Trading system - Simple system to make money 51 replies
London Open Trading System Test 20 replies
Trapping System: Way to Fully-Automated Trading System 47 replies
//@version=5
indicator('Open Interest', overlay = false, timeframe = "", format = format.volume)
// Symbol handling
sym = input.string('BINANCE', 'Exchange') + ':'
usdt_ticker = str.contains(syminfo.ticker, 'USDC') ? str.replace(syminfo.ticker, 'USDC', 'USDT') :
str.contains(syminfo.ticker, 'USD') and not str.contains(syminfo.ticker, 'USDT') ? str.replace(syminfo.ticker, 'USD', 'USDT') :
syminfo.ticker
is_perpetual = str.endswith(syminfo.ticker, 'P')
oi_ticker = sym + usdt_ticker + (is_perpetual ? '_OI' : '.P_OI')
[oi_o, oi_h, oi_l, oi_c] = request.security(oi_ticker, timeframe.period, [open, high, low, close], ignore_invalid_symbol=true)
c = nz(oi_c, 0)
OI = c
NV = c * close
plot(OI, color = color.rgb(0, 78, 9), style = plot.style_areabr, title = "Open Interest")
plot(NV, color = color.orange, linewidth = 2, title = "Notional Value of O.I.")