# AllAverages

This is a discussion on AllAverages within the Trading tools forums, part of the Trading Forum category; Originally Posted by igorad Hi logicgate, Sure, all is possible but could you please post the EVWMA formula because I ...

 Tweet
Hi logicgate,

Sure, all is possible but could you please post the EVWMA formula because I can't to find it.
Plus I suppose you are familiar with the Elastic Volume Weighted MA(eVWMA) which is in the list of MAs already.

Regards,
Igor
Hello Igor, thanks so much for replying. Check this one:

VEMA <- function(x, volumes, n = 10, wilder = F, ratio = NULL, ...)
{
x <- try.xts(x, error = as.matrix)
if (n < 1 || n > NROW(x))
stop("Invalid 'n'")
if (any(nNonNA <- n > colSums(!is.na(x))))
stop("n > number of non-NA values in column(s) ", paste(which(nNonNA),
collapse = ", "))
x.na <- xts:::naCheck(x, n)
if (missing(n) &#038;&#038; !missing(ratio))
n <- trunc(2/ratio - 1)
if (is.null(ratio)) {
if (wilder)
ratio <- 1/n
else ratio <- 2/(n + 1)
}

foo <- cbind(x[,1], volumes, VEMA.num(as.numeric(x[,1]), volumes, ratio), VEMA.den(volumes, ratio))
(foo[,3] / foo[,4]) -> ma

ma <- reclass(ma, x)
if (!is.null(dim(ma))) {
colnames(ma) <- paste(colnames(x), "VEMA", n, sep = ".")
}
return(ma)
}

VEMA.num <- function(x, volumes, ratio) {
ret <- c()
s <- 0
for(i in 1:length(x)) { s <- ratio * s + (1-ratio) * x[i] * volumes[i]; ret <- c(ret, s); }
ret
}

VEMA.den <- function(volumes, ratio) {
ret <- c()
s <- 0
for(i in 1:length(x)) { s <- ratio * s + (1-ratio) * volumes[i]; ret <- c(ret, s); }
ret
}

VEMA(1:20, 20:1, ratio=0.1)

VEMA(1:20, 20:1, ratio=0.9)

Check also here in this site:

https://www.financialwisdomforum.org...-stuff/EMA.htm

2. Originally Posted by logicgate
Hello Igor, thanks so much for replying. Check this one:

VEMA <- function(x, volumes, n = 10, wilder = F, ratio = NULL, ...)
{
x <- try.xts(x, error = as.matrix)
if (n < 1 || n > NROW(x))
stop("Invalid 'n'")
if (any(nNonNA <- n > colSums(!is.na(x))))
stop("n > number of non-NA values in column(s) ", paste(which(nNonNA),
collapse = ", "))
x.na <- xts:::naCheck(x, n)
if (missing(n) && !missing(ratio))
n <- trunc(2/ratio - 1)
if (is.null(ratio)) {
if (wilder)
ratio <- 1/n
else ratio <- 2/(n + 1)
}

foo <- cbind(x[,1], volumes, VEMA.num(as.numeric(x[,1]), volumes, ratio), VEMA.den(volumes, ratio))
(foo[,3] / foo[,4]) -> ma

ma <- reclass(ma, x)
if (!is.null(dim(ma))) {
colnames(ma) <- paste(colnames(x), "VEMA", n, sep = ".")
}
return(ma)
}

VEMA.num <- function(x, volumes, ratio) {
ret <- c()
s <- 0
for(i in 1:length(x)) { s <- ratio * s + (1-ratio) * x[i] * volumes[i]; ret <- c(ret, s); }
ret
}

VEMA.den <- function(volumes, ratio) {
ret <- c()
s <- 0
for(i in 1:length(x)) { s <- ratio * s + (1-ratio) * volumes[i]; ret <- c(ret, s); }
ret
}

VEMA(1:20, 20:1, ratio=0.1)

VEMA(1:20, 20:1, ratio=0.9)

Check also here in this site:

https://www.financialwisdomforum.org...-stuff/EMA.htm

Hi logicgate,

Please check out the AllAverages with the new V-EMA.

Regards,
Igor

3. Hi,

Please check out the updated AllAverages indicators for MT5.

Regards,
Igor

Hi,

Please check out the updated AllAverages indicators for MT5.

Regards,
Igor

hi, Igorad, how do you do, man?

Look at this one here - https://www.mql5.com/en/code/24381

Thi is Sharp modified MA

Best
D.P

5. Originally Posted by Dr.Phoenix
hi, Igorad, how do you do, man?

Look at this one here - https://www.mql5.com/en/code/24381

Thi is Sharp modified MA

Best
D.P
Hi Dr.Phoenix,

As I understand it's something similar to the Least Square Moving Average (or EPMA, Linear Regression Line).

Regards,
Igor

6. Hello Igor,

Thanks a lot for this!! Really appreciated this, all the best!

Cheers

Hi Dr.Phoenix,

As I understand it's something similar to the Least Square Moving Average (or EPMA, Linear Regression Line).

Regards,
Igor
Ok, did not know. thanks.

You know I have thought of... What if WMA (Whilders) and VWMA are to be "crossed" thogether. Just interesting to look at this "beast". Is it hard to make?

Best
D.P.

8. Hi Igor/ND,

How can I applied this to UniVolumeDelta in 2nd window, as you did? I tried to drag and put on 2nd window but not working.

Regards,
Jag
Hi,

Please check out the updated AllAverages indicators for MT5.

Regards,
Igor

Hi Igor/ND,

How can I applied this to UniVolumeDelta in 2nd window, as you did? I tried to drag and put on 2nd window but not working.

Regards,
Jag

• Open the chart.
• Attach UniVolumeDelta_v1_1 indicator from this post.
• After that - move AllAverages_v4.9 indicator from Navigator to the separate window of the chart (move by mouse).

10. Not sure, i did same, but in my case it goes to 1st window

Page 31 of 32 First ... 21 29 30 31 32 Last

1. ###### ?????????? ????????? MetaTrader 4 build 745 - MQL4 ?????
11-19-2014, 11:16 AM
2. ###### AllAverages indicator for Metatrader 4 build 600 | Newdigital Life
02-16-2014, 08:15 AM
3. ###### All Averages v3 template for MT4 | Newdigital Life
03-05-2013, 02:55 PM
4. ###### AllAverages new version of the indicator | Newdigital Life
03-01-2013, 02:24 PM