The FollowLine indicator is a trend following indicator. The blue/red lines are activated when the price closes above the upper Bollinger band or below the lower one.
Once the trigger of the trend direction is made, the FollowLine will be placed at High or Low (depending of the trend).
An ATR filter can be selected to place the line at a more distance level than the normal mode settled at candles Highs/Lows.
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 62 63 64 65 66 67 68 |
//PRC_FollowLine | indicator //03.04.2020 //Nicolas @ www.prorealcode.com //converted from MT4 code //Sharing ProRealTime knowledge // --- settings BBperiod = 21 BBdeviations = 1 ATRperiod = 5 UseATRfilter = 0 //0=false ; 1=true // --- end of settings BBUpper=average[BBperiod](close)+std[BBperiod]*BBdeviations BBLower=average[BBperiod](close)-std[BBperiod]*BBdeviations //----------------------------------------------------------------------------------- if(close>BBUpper) then BBSignal=1 endif if(close<BBLower) then BBSignal=-1 endif if(BBSignal>0) then if(UseATRfilter) then TrendLine=low-averagetruerange[ATRperiod] endif if(not UseATRfilter) then TrendLine=low endif if(TrendLine<TrendLine[1]) then TrendLine=TrendLine[1] endif endif //--- if(BBSignal<0) then if(UseATRfilter) then TrendLine=high+averagetruerange[ATRperiod] endif if(not UseATRfilter) then TrendLine=high endif if(TrendLine>TrendLine[1]) then TrendLine=TrendLine[1] endif endif //--- iTrend=iTrend[1] if(TrendLine>TrendLine[1]) then iTrend=1 endif if(TrendLine<TrendLine[1]) then iTrend=-1 endif if itrend>0 then r=0 g=191 b=255 else r=220 g=20 b=60 endif return trendline coloured(r,g,b) style(line,2) |
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
Nice indicator thank you Nicolas
can i use this in trading view plotform
No, all codes on our website are to be used with ProRealTime: https://www.prorealtime.com/en/
BUON GIORNO E’ POSSIBILE AVERE UN CHIARIMENTO?GRAZIE MILLE
Poni qui la tua domanda se è correlata a questo indicatore, altrimenti apri un nuovo argomento nel forum appropriato e segui le regole di pubblicazione. Grazie.
Hi Nicolas, can i backtest this indicator? And if so, how do i do it? I have tried, but don´t suce
Sure, use the forums to create a new topic to ask for it
Please respect the posting rules and describe precisely your query.
Bonjour Nicolas,
Je ne comprend pas bien , le trend change de couleur quand les prix sont au dessus/dessous des bandes de Bollinger;
mais quand les prix reviennent à l’intérieur la couleur reste identique.
Serait-il possible d’avoir une troisième couleur dans cette zone “neutre”
merci ,bonne journée
Oui ce serait possible, cependant l’indicateur est bien prévu pour conserver la couleur de la même tendance tant qu’on ne traverse pas le côté opposé des bandes de Bollinger.
Quand tu pourras si tu peux nous coder la troisième couleur cela améliorerait les trades court terme.
merci beaucoup.