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:
Published at
2025-02-28 19:23:39Event JSON
{
"id": "dff957b0762530c0334d536c756a12f147884d338e6826f5127d01b741ea5f06",
"pubkey": "fe32b72cf7c34a8ea1a45f2b98d389258d9b3f3f4b0c704601e2368914cfcb1e",
"created_at": 1740770619,
"kind": 1,
"tags": [
[
"t",
"bitcoin"
]
],
"content": "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. \n\n//@version=5\nindicator(\"BTC/SPX Ratio\", overlay=false)\n\n// Get BTC and SPX data\nbtc = request.security(\"BTCUSD\", timeframe.period, close)\nspx = request.security(\"SPX\", timeframe.period, close)\n\n// Calculate the ratio\nratio = spx / btc\n\n// Plot the ratio\nplot(ratio, title=\"BTC/SPX Ratio\", color=color.blue, linewidth=2)\n\n\nOutput: https://image.nostr.build/aa0572d0558df723102f1c75b198e9954194191b8c9c00a56995f4c95bfab973.png",
"sig": "7e1008df6b782faa277fe0da1e8b4ecc5b59ba96caebedc99cd927e5800fadbd76d21bc8ca58eb760bf9977219a307279cb99f71aac52a8fe8ea9abf21797626"
}