This oscillator determines the trend based on the maximum and minimum values between 3 different moving averages of chosen type. The distance between that 2 MA must be superior to 40% of the value of ATR (Average True Range) to confirm the trend by coloring the histogram into green for bullish and red for bearish. If histogram is gray, then no trend is identified.
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 |
//PRC_Braid Filter | indicator //06.04.23 //Nicolas @ www.prorealcode.com //Sharing ProRealTime knowledge // --- settings maType = 1 //0 = SMA 1 = EMA 2 = WMA 3 = Wilder 4 = Triangular 5 = End point 6 = Time series 7 = Hull 8 = ZeroLag Period1 = 3 //Period 1 Period2 = 7 //Period 2 Period3 = 14 //Period 3 // --- end of settings PipsMinSepPercent = 40 //-- Braid Filter ma01 = average[period1,maType](close) ma02 = average[period2,maType](open) ma03 = average[period3,maType](close) imax = max(max(ma01, ma02), ma03) imin = min(min(ma01, ma02), ma03) dif = imax - imin filter = AverageTrueRange[14](close) * PipsMinSepPercent / 100 //-- Plots if ma01 > ma02 and dif > filter then r=0 g=255 b=0 elsif ma02 > ma01 and dif > filter then r=255 g=0 b=0 else r=168 g=168 b=168 endif backgroundcolor(r,g,b,10) return dif as "Braid" coloured(r,g,b) style(histogram), filter as "Filter" coloured("blue") |
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
Is it possible to add histogram with only increasing bars?