The Damiani Volameter is another trend and range filter. When the black line is above the green line, it shows that the market is ranging. When the green line is above the black line, the market is trending. The indicator does not display which direction the market is trending, thus, you might need to add another directional indicator like momentum, to make it a complete trading system.
How to use it? suggestion it just purely to filter the ranging market from the trending market. Like most range and trend filters, the challenge is to know when the range market is ending and when the new trend is starting, vice versa.
Trending market = use trend strategies (moving average cross, etc)
Range market = use range strategies (stochastics, oscillators)
(text description from the forum). Translated from Metatrader4 source code by request on english forum.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
//PRC_Damiani Volatmeter | indicator //24.04.2017 //Nicolas @ www.prorealcode.com //Sharing ProRealTime knowledge //translated from MT4 indicator code //---settings //Viscosity=7 //Sedimentation=50 //Thresholdlevel=1.1 //lagsupressor=1 //boolean value (default=true) //MAtype=2 //MA type variable (2=Weighted average) //---end of settings if barindex>Sedimentation then lagsK=0.5 sa = averagetruerange[Viscosity] s1 = indc[1] s3 = indc[3] if lagsupressor then vol=sa/averagetruerange[Sedimentation]+lagsK*(s1-s3) else vol=sa/averagetruerange[Sedimentation] endif MA1=average[Viscosity,MAtype](typicalprice) D1=0 Sum1=0 for x1=0 to Viscosity-1 do D1=square(typicalprice[x1]-MA1) Sum1=Sum1+D1 anti=sqrt(Sum1/(x1+1)) next MA2=average[Sedimentation,MAtype](typicalprice) D2=0 Sum2=0 for x2=0 to Sedimentation-1 do D2=square(typicalprice[x2]-MA2) Sum2=Sum2+D2 Sedi=sqrt(Sum2/(x2+1)) next antithres=anti/Sedi t = Thresholdlevel t=t-antithres if(vol>t) then volt=vol else volt=vol endif indc=vol endif return volt coloured(0,200,0) style(line,2) as "volatility meter",t style(dottedline) as "threshold level" |
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, This looks great.
I would like to try and develop a system with this and the ROCnRoll indicator. Do you know where I can get the code for ROCnRoll?
Rod
I don’t know, this code is unavailable.
Very useful, it could potentially solve many problems of false signals!!Thanks Nicolas!
Hello Nicolas
which parameters could be modified to slow volatility? The viscosity?
ThanksAle
viscosity and sedimentation are only the classic “fast/slow” periods parameters for this indicator.
Thanks, Nicolas. Very useful. Would you tell me where to find what result conveys the function “indc[ ]” on the website? I’ve looked it up on the language documentation page, without success.
This is not an instruction of the programming language but a variable from this indicator (look at line 54).
OK. I didn’t notice it. Many thanks, Nicolas!