LazyBear

Variable Moving Average [LazyBear]

Variable Moving Average, often abbreviated as VMA, is an Exponential Moving Average developed by Tushar S. Chande. VMA automatically adjusts its smoothing constant on the basis of Market Volatility.

Use this like other Moving Averages. I have added the following options that can be enabled via options page:
- Trend Direction Indication: Green = Up trend, Blue = Potential congestion, Red = down trend.
- Color bars based on Trend

More info:
www.thewizardtrader....leMovingAverage.aspx

List of my other indicators:
- GDoc: docs.google.com...ByMEvm5MLo/edit?usp=sharin...
- Chart:

List of my free indicators: bit.ly/1LQaPK8
List of my indicators at Appstore: blog.tradingview.com/?p=970
오픈 소스 스크립트

이 스크립트의 오써는 참된 트레이딩뷰의 스피릿으로 이 스크립트를 오픈소스로 퍼블리쉬하여 트레이더들로 하여금 이해 및 검증할 수 있도록 하였습니다. 오써를 응원합니다! 스크립트를 무료로 쓸 수 있지만, 다른 퍼블리케이션에서 이 코드를 재사용하는 것은 하우스룰을 따릅니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.

차트에 이 스크립트를 사용하시겠습니까?
//
// @author LazyBear 
// List of all my indicators: 
// https://docs.google.com/document/d/15AGCufJZ8CIUvwFJ9W-IKns88gkWOKBCvByMEvm5MLo/edit?usp=sharing
// 
study(title="Variable Moving Average [LazyBear]", shorttitle="VMA_LB", overlay=true)
src=close
l =input(6, title="VMA Length") 
std=input(false, title="Show Trend Direction")
bc=input(false, title="Color bars based on Trend")
k = 1.0/l
pdm = max((src - src[1]), 0)
mdm = max((src[1] - src), 0)
pdmS = ((1 - k)*nz(pdmS[1]) + k*pdm)
mdmS = ((1 - k)*nz(mdmS[1]) + k*mdm)
s = pdmS + mdmS
pdi = pdmS/s
mdi = mdmS/s
pdiS = ((1 - k)*nz(pdiS[1]) + k*pdi)
mdiS = ((1 - k)*nz(mdiS[1]) + k*mdi)
d = abs(pdiS - mdiS)
s1 = pdiS + mdiS
iS = ((1 - k)*nz(iS[1]) + k*d/s1)
hhv = highest(iS, l) 
llv = lowest(iS, l) 
d1 = hhv - llv
vI = (iS - llv)/d1
vma = (1 - k*vI)*nz(vma[1]) + k*vI*src
vmaC=(vma > vma[1]) ? green : (vma<vma[1]) ? red : (vma==vma[1]) ? blue : black 
plot(vma, color=std?vmaC:black, linewidth=3, title="VMA")
barcolor(bc?vmaC:na)