AusBitBank

SBD steempeg v0.1

A simple indicator to show the current USD value of a Steem Backed Dollar , based on the POLONIEX:SBDBTC and BITFINEX:BTCUSD prices .
Plot lines are marked at $1 , $0.90 , $0.80 and plot line color changes depending on its current price for a quick visual reference.

If you appreciate this please show some love to steemit.com/@ausbitbank !

开源脚本

本着真正的TradingView精神,该脚本的作者将其开源发布,以便交易者可以理解和验证它。为作者喝彩!您可以免费使用它,但在出版物中重复使用此代码受网站规则的约束。 您可以收藏它以在图表上使用。

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?
//@version=2
// SBD steempeg indicator by @ausbitbank
// https://steemit.com/@ausbitbank
// Work in progress v0.1   (@version on line1 is to enable pinescript if statements .. TIL)
study(title = "SBD steempeg v0.1", shorttitle = "SBD steempeg indicator")
polosbdbtc = security("POLONIEX:SBDBTC",period, close)
bitfinexbtcusd = security("BITFINEX:BTCUSD",period, close)
polosteembtc = security("POLONIEX:STEEMBTC",period,close)
polosbdpeg = (polosbdbtc*bitfinexbtcusd)
plotcolor = if polosbdpeg<1
    if polosbdpeg<0.9
        red
    else
        orange
else
    green
plot(polosbdpeg,color=plotcolor,linewidth=2)
plot(1,color=green)
plot(0.9,color=yellow)
plot(0.8,color=orange)