SpreadEagle71

CCI with Volume Weighted EMA

Here is an attempt to improve on the CCI using a volume weighted ema which is then plugged into the CCI formula.
Use:
The CCI with VW EMA is an oscillator that gives readings between -100 and +100. The usual use is to 'go long' with values over +100 and short on values less than -100.
Another use of this oscillator is a countertrend indicator where one sells at crosses under +100 and buys on crosses over -100.
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 đồ?
Title="CCI with Volume Weighted EMA"
//CCI with Volume Weighted EMA
//This indicator uses a Volume Weighted EMA which is then plugged into 
//the standard CCI(Commodity Channel Index) formula.
//By SpreadEagle71

study(title="CCI with Volume Weighted EMA ", overlay=false)
length = input(10, minval=1)
xMAVolPrice = ema(volume * close, length)
xMAVol = ema(volume, length)
src = xMAVolPrice / xMAVol

ma = sma(src, length)
cci = (src - ma) / (0.015 * dev(src, length))
plot(cci, color=black, linewidth=2)
band1 = hline(100, color=gray, linestyle=dashed)
band0 = hline(-100, color=gray, linestyle=dashed)
fill(band1, band0, color=olive)