Why Nostr? What is Njump?
2025-02-28 19:23:39

Cykros on Nostr: To folks that use TradingView, or who would otherwise like the ability to chart other ...

To folks that use TradingView, or who would otherwise like the ability to chart other securities/assets in terms of #Bitcoin (ie, to use Bitcoin as their unit of account for measuring financial assets), I just got this output from Claude that gave me a handle little indicator to throw up. I'm sure Pinescript gurus can do quite a bit more (and I'd love to see your snips!) but this is a lot better than my previous attempts at doing this sort of thing in Excel had been going. Of course, feel free to change "SPX" to whatever ticker you'd want to see priced in BTC.

//@version=5
indicator("BTC/SPX Ratio", overlay=false)

// Get BTC and SPX data
btc = request.security("BTCUSD", timeframe.period, close)
spx = request.security("SPX", timeframe.period, close)

// Calculate the ratio
ratio = spx / btc

// Plot the ratio
plot(ratio, title="BTC/SPX Ratio", color=color.blue, linewidth=2)


Output:
Author Public Key
npub1lcetwt8hcd9gagdytu4e35ufykxek0elfvx8q3spugmgj9x0ev0q363apw