Relative Strengh Index Divergences
Forums › ProRealTime forum Français › Support ProBuilder › Relative Strengh Index Divergences
- This topic has 2 replies, 2 voices, and was last updated 1 year ago by Alai-n.
-
-
09/26/2022 at 9:33 AM #201404
Bonjour,
Je vais très certainement dire une ânerie, mais je m’interroge sur certaines lignes du code Rsi Divergences disponible dans la bibliothèque des indicateurs !
En effet l’auteur a choisi de prendre le (close) pour définir son MyRSI (ligne 15), cependant si je ne dis pas de bêtises lignes 24, 29, 30 et 33 il compare des High avec des High pour détecter des divergences baissières et inversement lignes 44, 49, 50 et 53 des Low avec des Low pour détecter
des divergences haussières !!! N’y aurait-il pas un non sens car le MyRsi est paramétré sur la Close ???
Realtive Strengh Index Divergences Anomalies1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162//RSI Divergences By Frank (Francesco)//Description: the indicator draws arrows on chart as entry points when a direct or an hidden RSI divergence is found.//When a DIRECT divergence is found, "dd" (direct divergence) text is added to chart over (Sell signal) or under (Buy signal) the arrow//When an HIDDEN or INVERSE divergence is found, "hd" (hidden divergence) text is added to chart over (Sell signal) or under (Buy signal) the arrow//Variables://RsiPeriod: number of bars to calculare RSI value//RsiOverSold: Oversold Level//RsiOverBought: OverBought Level//MinBarRange: minimum distance from two consecutive RSI Highs or RSI LowsRge = averagetruerange[10](close)MyRSI = rsi[RsiPeriod](Close)ONCE ShiftText = 3RsiMax = MyRSI < MyRSI[1] and MyRSI[1] > MyRSI[2] and MyRSI[1] > RsiOverBoughtRsiMin = MyRSI > MyRSI[1] and MyRSI[1] < MyRSI[2] and MyRSI[1] < RsiOverSoldif RsiMax thenRSIMax1 = MyRSI[1]High1 = High[1]for I = MinBarRange to 80if RsiMax[I] thenRSIMax2 = MyRSI[I + 1]High2 = High[I + 1]If High1 > High2 and RSIMax1 < RSIMax2 thenDRAWARROWDOWN(barindex, High + Rge / ShiftText)coloured(255,192,203,255)DRAWTEXT("dd", barindex, High + Rge / ShiftText / 0.3,SansSerif,Italic,10)coloured(0,0,255,255)elsif High1 < High2 and RSIMax1 > RSIMax2 thenDRAWARROWDOWN(barindex, High + Rge / ShiftText)coloured(255,192,203,255)DRAWTEXT("hd", barindex, High + Rge / ShiftText / 0.2,SansSerif,Italic,10)coloured(0,0,255,255)endifbreakendifnextendifif RsiMin thenRSIMin1 = MyRSI[1]Low1 = Low[1]for I = MinBarRange to 80if RSIMin[I] thenRSIMin2 = MyRSI[I + 1]Low2 = Low[I + 1]If Low1 < Low2 and RSIMin1 > RSIMin2 thenDRAWARROWUP(barindex, lOW - Rge / ShiftText)coloured(0,0,255,255)DRAWTEXT("dd", barindex, lOW - Rge / ShiftText / 0.3,SansSerif,Italic,10)coloured(0,0,255,255)elsif Low1 > Low2 and RSIMin1 < RSIMin2 thenDRAWARROWUP(barindex, lOW - Rge / ShiftText)coloured(0,0,255,255)DRAWTEXT("hd", barindex, lOW - Rge / ShiftText / 0.2,SansSerif,Italic,10)coloured(0,0,255,255)endifbreakendifnextendifreturn09/26/2022 at 10:07 AM #201407Une divergence c’est simplement une désynchronisation entre un indicateur qui se calcule sur une période avec le prix qui lui ne connaît aucune bornes. On peut détecter des divergences entre des bananes et des abricots si on veut 😆
Ce que je veux dire c’est qu’il n’y a aucune notion empirique sur comment doit se trouver une divergence. Ici à mon sens, il n’y a pas de problème particulier, 99% des détections de divergences se font en utilisant le paramétrage par défaut de l’oscillateur avec lequel on compare le prix et on utilise le Close.
Par ailleurs, chacun voyant midi à sa porte sur ce sujet, libre à toi de modifier le prix utilisé dans le code que tu as indiqué 😉
1 user thanked author for this post.
09/26/2022 at 10:45 AM #201412 -
AuthorPosts