TradingView
Spectrum101
Dec 2, 2019 5:57 PM
Longs Vs Shorts BTC - Open source
BITFINEX:BTCUSD
240
Bitcoin / Dollar
Bitfinex
Description
⋅
Dec 2, 2019 5:57 PM
Using percentage function to compare longs/shorts over a defined time window and smoothing (a dividor of the time window)
Oscillators
Comments
UnknownUnicorn2955934
⋅
Dec 14, 2019 4:35 PM
I like this! Line 8 - line 9 gives a nice single line.
Spectrum101
⋅
Dec 14, 2019 6:19 PM
@stluvin, Thanks
Spectrum101
⋅
Dec 14, 2019 7:23 PM
//
@version
=3
study("longsshorts-delta")
shorts=security("btcusdshorts", period, close)
longs=security("btcusdlongs", period, close)
size = input(365,title="test window")
div = input(35,title='div window for sma')
a = ema(percentrank(longs,size),floor(size/div))
b = ema(percentrank(shorts,size),floor(size/div))
d = a-b
plot(a-b,style=area)
// copy paste to see the line 8 - line 9
gunbot_scooby
⋅
Jan 29, 2021 4:43 PM
Does this only work with BTC or can i use it with stocks too?
Spectrum101
⋅
Jan 30, 2021 5:18 PM
@gunbot_scooby
, It uses btc shorts/longs ticker
More