Is there an MT4 version of Chande's variable moving average?

1
I am looking for an MT4 version of Tushar Chande's variable moving average. A version of this implemented for TradingView is below.

I have tried using the search function on the website and also google but have not come across anything.

Code: Select all

//
// @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)


Re: Is there an MT4 version of Chande's variable moving average?

3
xpf2003 wrote: Wed Mar 23, 2022 1:11 am I am looking for an MT4 version of Tushar Chande's variable moving average. A version of this implemented for TradingView is below.

I have tried using the search function on the website and also google but have not come across anything.
Hi there mate, as Andrei said, VIDYA is Tushar Chande's variable moving average which you can find here: VIDYA.

Please also see this first post which compares Jurik Vs VIDYA (Chande's Variable Moving Average). You should consider using Jurik as it has less lag and better smoothing than VIDYA :thumbup:

Image

PS: If you would like to search for VIDYA files, you may use our guide on doing a Deep Search, here: How to Deep Search Forex-station.
These users thanked the author Jimmy for the post (total 3):
xpf2003, andrei-1, 太虚一毫
Guide to the "All Averages" Filters (ADXvma, Laguerre etc.) 🆕
Use Fibonacci numbers for indicator settings + How to draw Fibonacci Extensions
An easy trick for drawing Support & Resistance

Re: Is there an MT4 version of Chande's variable moving average?

4
xpf2003 wrote: Wed Mar 23, 2022 1:11 am I am looking for an MT4 version of Tushar Chande's variable moving average. A version of this implemented for TradingView is below.

I have tried using the search function on the website and also google but have not come across anything.

Code: Select all

//
// @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)
That formula looks kinda close to the ADXvma.
These users thanked the author mrtools for the post:
太虚一毫




Who is online

Users browsing this forum: Amazon [Bot], Bing [Bot], erex, Google [Bot], Nanyuki, navid110, ROI, Sogou [Bot], Steam1, Telegram [Bot], thomdel, Trendiction [Bot], Yahoo Japan [Bot], Yandex [Bot] and 96 guests