LazyBear

Indicator: Balance Of Power

**** Code updated. Make sure you pick up the latest version posted (not the code in the published chart) ******

An oscillator that represents the battle between the bulls and the bears in the market.

BOP supports spotting price divergence, trends, and overbought-oversold levels.A change in the BOP trend serves as a warning signal and should be confirmed by a change in the price direction.

More info @ www.fxtimes.com/glos...alance-of-power-bop/




Updated the code to match ThinkOrSwim platform's indicator (request from user @mika2k1). v2 code here: pastebin.com/9UEDCf86

This allows you to plot only the EMA (instead of actual BOP). Sample image posted in the comments below.

List of my free indicators: bit.ly/1LQaPK8
List of my indicators at Appstore: blog.tradingview.com/?p=970
نص برمجي مفتوح المصدر

قام مؤلف هذا النص البرمجي بنشره وجعله مفتوح المصدر، بحيث يمكن للمتداولين فهمه والتحقق منه، وهو الأمر الذي يدخل ضمن قيم TradingView. تحياتنا للمؤلف! يمكنك استخدامه مجانًا، ولكن إعادة استخدام هذا الكود في منشور تحكمه قواعد الموقع. يمكنك جعله مفضلاً لاستخدامه على الرسم البياني.

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.

هل تريد استخدام هذا النص البرمجي على الرسم البياني؟
//
// @author LazyBear
//
// Balance Of Power - BOP
//
study(title = "Balance of Power [LazyBear]",shorttitle="BOP_LB")
PlotEMA=input(true, "Plot SMA?", type=bool)
PlotOuterLine=input(false, "Plot Outer line?", type=bool )
length=input(14, title="MA length")
BOP=(close - open) / (high - low)
b_color=(BOP>=0 ? (BOP>=BOP[1] ? green : orange) : (BOP>=BOP[1] ? orange : red))
hline(0)
plot(BOP, color=b_color, style=columns, linewidth=3)
plot(PlotOuterLine?BOP:na, color=gray, style=line, linewidth=2)
plot(PlotEMA?sma(BOP, length):na, color=navy, linewidth=2)