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.
//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"
You must be logged in to post a comment.
//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"
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
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?
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