NO LINKS OR MQL SOURCE CODE REQUESTS. Please follow the rules.

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.
Trade with the broker that supports our work! FBS are offering $140 to get you started! Click here to begin live trading, today.
No commissions are earned by Forex-station.


Guide to the "All Averages" Filters (ADXvma, Laguerre etc.) 🆕
How to draw Fibonacci Extensions the easy way
How to easily find & draw major 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.




  1. Similar Topics

    1. 7 Replies
      7734 Views
    2. 7 Replies
      1094 Views
    3. .mq4 version of this indicator or comparable indicator

      3 Replies 1412 Views

      by ajk49, Sun Feb 06, 2022 2:18 am in Coding Help

      3 Replies
      1412 Views

Return to “MT4 Indicators”

Users viewing this forum: ayanboy, bongisgood, ChuChu Rocket, CommonCrawl [Bot], Don, Facebook [Crawler], fantom_spb, Ganesh, Google [Bot], handy148, hernandez, Jimmy, luo83868008, moey_dw, morgangerry, phnthnhnm, rudiarius, Skyold, tradersanbrokers and 74 guests