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)