LazyBear

McClellan Summation Index [LazyBear]

McClellan Summation Index is a breadth indicator derived from McClellan Oscillator (www.tradingview.com/v/8YstxIAf/).

The Summation Index is simply a running total of the McClellan Oscillator values. Even though it is called a Summation Index, the indicator is really an oscillator that fluctuates above/below zero. As such, signals can be derived from bullish/bearish divergences, directional movement and centerline crossovers. A moving average can also be applied to identify upturns and downturns.

Indicator uses the advancing/declining stocks from NYSE by default, but you can change them to any market in the options dialog.

More info:
- www.mcoscillator.com...tor_summation_index/
- stockcharts.com...school/doku.php?id=chart_s...


Complete list of my indicators:
docs.google.com...ByMEvm5MLo/edit?usp=sharin...

List of my free indicators: bit.ly/1LQaPK8
List of my indicators at Appstore: blog.tradingview.com/?p=970
Mã nguồn mở

Với tinh thần TradingView, tác giả của tập lệnh này đã xuất bản nó dưới dạng mã nguồn mở, vì vậy các nhà giao dịch có thể hiểu và xác minh nó. Chúc mừng tác giả! Bạn có thể sử dụng mã này miễn phí, nhưng việc sử dụng lại mã này trong một ấn phẩm chịu sự điều chỉnh của Nội quy nội bộ. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ.

Thông báo miễn trừ trách nhiệm

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?
//
// @author LazyBear 
// List of all my indicators: 
// https://docs.google.com/document/d/15AGCufJZ8CIUvwFJ9W-IKns88gkWOKBCvByMEvm5MLo/edit?usp=sharing
//
study("McClellan Summation Index [LazyBear]", shorttitle="MSI_LB")
advissues=input(defval="ADVN", title="Advancing Stocks Symbol", type=symbol)
decissues=input(defval="DECN", title="Declining Stocks Symbol", type=symbol)
isRA=input(true, title="Stockcharts version (Ratio Adjusted)?")
rm=input(defval=1000, title="RANA ratio multiplier")

useCTF=input(false, title="Use Custom Timeframe?"), 
tf=useCTF?input("D", type=resolution, title="Custom Timeframe"):period
ai=security(advissues, tf, close), di=security(decissues, tf, close)
rana=rm * (ai-di)/(ai+di)
e1=isRA?ema(rana, 19):ema(ai-di, 19),e2=isRA?ema(rana, 39):ema(ai-di, 39)
mo=e1-e2,msi=nz(msi[1])+mo

hline(0, title="ZeroLine")
plot(msi<0?msi:0, style=area, color=red, title="MSI_Negative")
plot(msi>=0?msi:0, style=area, color=green, title="MSI_Positive")
plot(msi, style=line, color=black, title="MSI", linewidth=2)