This is an indicator that gives signals of current trend with red/green histogram. Basically, it tests if the actual Close is above or below a moving average (periods and type can be modified in settings).
In a bullish or a bearish trend, the green and red histogram give strength of Volumes information, to identify trend exhaustion or pullbacks.
Converted from an MT4 indicator code, requested on Spanish 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 |
//PRC_Voluminator | indicator //27.02.2017 //Nicolas @ www.prorealcode.com //Sharing ProRealTime knowledge //translated from MT4 // --- parameters //SmoothPeriod = 14 //SmoothMethod = 0 (MMtype) // --- once alpha = 2.0/(1.0+SmoothPeriod) if barindex>SmoothPeriod then ma = average[SmoothPeriod,SmoothMethod](close) if close>ma then vol = +volume elsif close<ma then vol = -volume else vol = 0 endif if vol >0 then levelu = levelu[1]+alpha*(vol-levelu[1]) elsif vol <0 then levelu = levelu[1] else levelu = 0 endif if vol <0 then leveld = leveld[1]+alpha*(vol-leveld[1]) elsif vol >0 then leveld = leveld[1] else leveld = 0 endif if vol>0 then trend = 1 elsif vol<0 then trend = -1 else trend = 0 endif if trend = 1 then valuehu = levelu valuehd = 0 else valuehu = 0 valuehd = leveld endif endif return valuehu coloured(0,200,0) style(histogram), valuehd coloured(200,0,0) style(histogram), levelu coloured(110,110,110) style(dottedline), leveld coloured(110,110,110) style(dottedline), 0 coloured(100,100,100) style(point) |
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