v10.3
The Perfect Trend Line indicator act as a trend following indicator. It is simply made of 2 lines from highest high and lowest low of 2 different periods, one short and a longer one.
If the price breaches the longest line, it is a sign a of potential trend reversal, while if price is in the cloud made of these 2 lines, it is only a retracement and a potential price rebound in the same direction as the main trend.
Confirmation of trend reversal are highlighted with blue and red dots.
The cloud can be expanded with the SlowPipDisplace and the FastPipDisplace settings which must be set in points/pips values.
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 58 59 60 61 | //PRC_PerfectTrendLine ptl | indicator //16.10.2017 //Nicolas @ www.prorealcode.com //Sharing ProRealTime knowledge //converted from MT4 version (original author mladen) //enhanced version by Nicolas // --- settings //SlowLength = 7 // Slow length //SlowPipDisplace= 0 // Slow pip displace //FastLength = 3 // Fast length //FastPipDisplace= 0 // Fast pip displace // --- end of settings thigh1 = Highest[SlowLength](high)+ SlowPipDisplace*pointsize tlow1= Lowest[SlowLength](low)- SlowPipDisplace*pointsize thigh2 = Highest[FastLength](high)+ FastPipDisplace*pointsize tlow2= Lowest[FastLength](low)- FastPipDisplace*pointsize if barindex>2 then if Close>line1[1] then line1 = tlow1 else line1 = thigh1 endif if Close>line2[1] then line2 = tlow2 else line2 = thigh2 endif endif if (Close[0]<line1[0] and Close[0]<line2[0]) then trend =1 endif if (Close[0]>line1[0] and Close[0]>line2[0]) then trend = -1 endif if (line1[0]>line2[0] or trend[0] =1) then trena =1 endif if (line1[0]<line2[0] or trend[0] = -1) then trena = -1 endif if trena<>trena[1] then if trena=1 then x = max(line1,line2) r=200 g=20 b=60 else x = min(line1,line2) r=30 g=144 b=255 endif drawtext("●",barindex,x,Dialog,Bold,10) coloured(r,g,b) endif drawbarchart(line1,line2,line1,line2) coloured(r,g,b,50) return line1 coloured(r,g,b,100) style(line,1),line2 coloured(r,g,b,100) style(line,1) |
Share this
Risk disclosure:
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 :
Filename : download the ITF files
How to import ITF files into ProRealTime platform?
Find other exclusive trading pro-tools on
PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials