FOLLOWLINE INDICATOR neutre
Forums › ProRealTime forum Français › Support ProBuilder › FOLLOWLINE INDICATOR neutre
- This topic has 9 replies, 3 voices, and was last updated 1 year ago by
supertiti.
-
-
05/17/2023 at 12:48 PM #214840
Bonjour à tous,
Serait-il possible (à priori oui) de différencier la couleur de l’indicateur (une troisième couleur) quand celui – ci est à l’intérieur des bandes de Bollinger.
Ceci afin d’attraper les phases de sur-achat ou sur-vente.
Bons trades à tous.
Followline indicator1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374//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 perso = 1// --- end of settingsdefparam calculateonlastbars = 150BBUpper=average[BBperiod](close)+std[BBperiod]*BBdeviationsBBLower=average[BBperiod](close)-std[BBperiod]*BBdeviations//-----------------------------------------------------------------------------------if(close>BBUpper) thenBBSignal=1endifif(close<BBLower) thenBBSignal=-1endifif(BBSignal>0) thenif(UseATRfilter) thenTrendLine=low-averagetruerange[ATRperiod]endifif(not UseATRfilter) thenTrendLine=lowendifif(TrendLine<TrendLine[1]) thenTrendLine=TrendLine[1]endifendif//---if(BBSignal<0) thenif(UseATRfilter) thenTrendLine=high+averagetruerange[ATRperiod]endifif(not UseATRfilter) thenTrendLine=highendifif(TrendLine>TrendLine[1]) thenTrendLine=TrendLine[1]endifendif//---iTrend=iTrend[1]if(TrendLine>TrendLine[1]) theniTrend=1endifif(TrendLine<TrendLine[1]) theniTrend=-1endifif itrend>0 thenr=255 //0g=0 //191b=255 //255elser=72 //220g=0 //20b=255 //60endif//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////return trendline coloured(r,g,b) style(dottedline1 ,5)//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.05/20/2023 at 9:53 AM #214928Salut,
Par exemple, vous pouvez faire dépendre les couleurs de :
- Close>BBUpper
- Close>BBLower et Close<BBUpper
- Close<BBLower
(Vous obtenez un autre type d’indicateur à cause de cela…)
FOLLOW LINE INDICATOR12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273// --- settingsBBperiod = 20BBdeviations = 1ATRperiod = 5UseATRfilter = 0 //0=false ; 1=true perso = 1// --- end of settingsBBUpper=average[BBperiod](close)+std[BBperiod]*BBdeviationsBBLower=average[BBperiod](close)-std[BBperiod]*BBdeviations//-----------------------------------------------------------------------------------if(close>BBUpper) thenBBSignal=1endifIf (Close<BBUpper) and (Close>BBLower) thenBBSignal=0EndIfif(close<BBLower) thenBBSignal=-1endif//---if(BBSignal>0) thenif(UseATRfilter) thenTrendLine=low-averagetruerange[ATRperiod]endifif(not UseATRfilter) thenTrendLine=lowendifendif//---if(BBSignal=0) thenif(UseATRfilter) thenTrendLine=(High+Low)/2-averagetruerange[ATRperiod]endifif(not UseATRfilter) thenTrendLine=(High+Low)/2endifendif//---if(BBSignal<0) thenif(UseATRfilter) thenTrendLine=high+averagetruerange[ATRperiod]endifif(not UseATRfilter) thenTrendLine=highendifendif//---if BBSignal>0 theniTrend=1endifif BBSignal=0 theniTrend=0endifif BBSignal=-1 theniTrend=-1endifif iTrend>0 thenr=0 //0g=255 //191b=0 //255EndIfIf iTrend=0 thenr=0g=0b=255EndIfIf iTrend<0 thenr=255 //220g=0 //20b=0 //60endifreturn trendline coloured(r,g,b) style(dottedline1 ,5)//, BBUpper Coloured("Green"),BBLower Coloured("Red")05/20/2023 at 2:12 PM #21493405/21/2023 at 8:07 AM #214956Salut,
Je pense que ce graphique donne une image plus claire…
J’ai fait quelques ajustements, d’abord le « Low » a été utilisé lorsque le prix est passé au-dessus du BBUpper et maintenant j’utilise le « High » pour une image plus claire…
Il en va de même pour le prix en dessous du BBLower, il fonctionne maintenant avec le « Low » au lieu du « High »…
Follow Line Indicator123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081// --- settingsBBperiod = 20BBdeviations = 1ATRperiod = 5UseATRfilter = 0 //0=false ; 1=true perso = 1// --- end of settingsBBUpper=average[BBperiod](close)+std[BBperiod]*BBdeviationsBBLower=average[BBperiod](close)-std[BBperiod]*BBdeviations//-----------------------------------------------------------------------------------if(close>BBUpper) thenBBSignal=1endifIf (Close<BBUpper) and (Close>BBLower) thenBBSignal=0EndIfif(close<BBLower) thenBBSignal=-1endif//---if(BBSignal>0) thenif(UseATRfilter) thenTrendLine=High-averagetruerange[ATRperiod]endifif(not UseATRfilter) thenIf High<High[1] thenTrendLine=TrendLine[1]elseTrendLine=Highendifendifendif//---if(BBSignal=0) thenif(UseATRfilter) thenTrendLine=(High+Low)/2-averagetruerange[ATRperiod]endifif(not UseATRfilter) thenTrendLine=(High+Low)/2endifendif//---if(BBSignal<0) thenif(UseATRfilter) thenTrendLine=Low+averagetruerange[ATRperiod]endifif(not UseATRfilter) thenIf Low>Low[1] thenTrendLine=TrendLine[1]elseTrendLine=LowendifendifEndIf//---if BBSignal>0 theniTrend=1endifif BBSignal=0 theniTrend=0endifif BBSignal=-1 theniTrend=-1endifif iTrend>0 thenr=0 //0g=255 //191b=0 //255EndIfIf iTrend=0 thenr=0g=0b=255EndIfIf iTrend<0 thenr=255 //220g=0 //20b=0 //60endifreturn trendline coloured(r,g,b) style(dottedline1 ,5)//, BBUpper Coloured("Green"),BBLower Coloured("Red")05/21/2023 at 10:14 AM #21497005/22/2023 at 8:16 AM #21499405/22/2023 at 11:15 AM #21500805/23/2023 at 8:40 AM #21504705/23/2023 at 9:35 AM #21505105/23/2023 at 9:45 AM #215054 -
AuthorPosts
Find exclusive trading pro-tools on