The eWMA is a moving average that use Volume to calculate its period. This moving average is a statistical measure of the Volume other time, which display nicely the price direction. Originally developped by Christian P. Fries, I added here a “kind of” band for buy/sell triggers or trend filtering purpose.
The band is made of the highest high or the lowest low of the eWMA. Trend direction change when the eWMA piercing its own value, back to N previous period.
This indicator needs instruments with Volume for calculation.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
//parameters : // period = 20 // lookback = 10 IF BarIndex < period THEN eVWMA = Close ELSE N = Summation[period](Volume) eVWMA = ((N - Volume)*eVWMA + Volume*Close)/N ENDIF hh = highest[period](evWMA) ll = lowest[period](evWMA) if evWMA>hh[lookback] then trend = ll elsif evWMA<ll[lookback] then trend = hh endif RETURN trend as "support resistance zone", evWMA as "elastic weigthed moving average" |
Share this
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.
ProRealTime ITF files and other attachments :PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials
Hi Nicolas,
above all, I wanted to thank you for your site which brings me a lot as new on prorealtime.
I use the indicator in French “moyenne mobile à période pondérée par le volume” which is by default with a number of period of 15 for the moving average and which works whatever the time unit of the candles and also whatever the amount of intraday data. The problem is that this indicator does not work with proorder.
So I found the one that you created. it works but not necessarily in all configurations: when I choose the UT in M30 and for 1000 units for example. Could you explain to me why I have this problem, please?
Lack of volumes maybe?
I do my tests on the DAX however. What I can’t understand is why the PRT indicator works without problem whatever the TU and the units. The worst part is that I do not see what other formula they could have used other than the one you use in your code … It does not matter, I will limit my UT and the units so that your coding works . Thanks anyway Nicolas
for those who are interested, I made this small modification of the code for the eWMA which allows me to no longer have any problem whatever the number of period
//parameters :
period = 20
lookback = 1
IF BarIndex < period THEN
eVWMA = Close
ELSE
if Volume=0 then
VolumeTempo = 0.001
else
volumetempo = Volume
endif
N = Summation[period](volumetempo)
eVWMA = ((N – volumetempo)*eVWMA + volumetempo*Close)/N
//MM20=WeightedAverage[period](close)
ENDIF
hh = highest[period](evWMA)
ll = lowest[period](evWMA)
if evWMA>hh[lookback] then
trend = ll
elsif evWMA<ll[lookback] then
trend = hh
endif
//RETURN trend as “support resistance zone”, evWMA as “elastic weigthed moving average”,MM20 as “MM20”
RETURN trend as “support resistance zone”, evWMA as “elastic weigthed moving average”
Hello Totof, I was looking for the code for the ‘eVWMA = elastic Volume Weighted Moving Average’ as it appears in PRT because strangely enough, I couldn’t retrieve it using the ‘code suggestions’ in PRT. I wanted to use it to create my own indicator. Then I saw that you used it in your indicator, so I was able to extract it from there. I don’t use your indicator (sup/res) further, but I’m really happy with the eVWMA part. So, thank you!! Regards, Pieter