Search
Products
Community
Markets
News
Brokers
More
IN
Get started
Community
/
Ideas
/
Mbe
Gold Spot / U.S. Dollar
Mbe
By 050deacfd7ed491395b33e904d9274
Follow
Follow
Sep 7
0
Sep 7
//
version
=5
indicator("Market Breadth Indicator (MBE)", overlay=false)
// สร้างตัวแปรสำหรับหุ้นที่เพิ่มขึ้นและลดลง
advancing = close > close[1] ? 1 : 0
declining = close < close[1] ? 1 : 0
// คำนวณ Advance-Decline Line
adl = ta.cum(advancing - declining)
// คำนวณ Advance-Decline Ratio
ad_ratio = ta.sum(advancing, 1) / ta.sum(declining, 1)
// คำนวณ New Highs-New Lows
new_highs = ta.highest(close, 52) == close ? 1 : 0
new_lows = ta.lowest(close, 52) == close ? 1 : 0
nh_nl = ta.cum(new_highs - new_lows)
// การแสดงผลบนกราฟ
plot(adl, title="Advance-Decline Line", color=color.blue)
plot(ad_ratio, title="Advance-Decline Ratio", color=color.green)
plot(nh_nl, title="New Highs-New Lows", color=color.red)
Support and Resistance
Trend Analysis
050deacfd7ed491395b33e904d9274
Follow
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the
Terms of Use
.