Average Vidya sur RSI
Forums › ProRealTime English forum › ProBuilder support › Average Vidya sur RSI
- This topic has 5 replies, 2 voices, and was last updated 1 year ago by Bateson.
-
-
11/23/2023 at 12:28 AM #224180
Bonjour
je souhaiterai savoir comment lisser RSI avec une moyenne mobile Vidya.
Voici le début du code mais il renvoie un signal d’erreur.
Merci beaucoup pour votre aide
123456789101112131415161718<span style="vertical-align: inherit;"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">//Vidya </span></span></span></span><span style="vertical-align: inherit;"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">//Période = 14 </span></span></span></span><span style="vertical-align: inherit;"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">si barindex>100 alors </span></span></span></span><span style="vertical-align: inherit;"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">k=abs(Chandle[20](fermer))/100 </span></span></span></span><span style="vertical-align: inherit;"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">alpha=2/(14+1) </span></span></span></span><span style="vertical-align: inherit;"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">vidya=(alfa*k*fermer+(1-alfa*k )*vidya[1]) </span></span></span></span><span style="vertical-align: inherit;"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">fin si </span></span></span></span><span style="vertical-align: inherit;"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">//retourne Vidya, Fermer </span></span></span></span><span style="vertical-align: inherit;"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">//lisserRSI = moyenne[val, moyenne](RSI[rsival]) </span></span></span></span><span style="vertical-align: inherit;"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">smoothrsi= moyenne [14,vidya] (RSI[rsival]) </span></span></span></span><span style="vertical-align: inherit;"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">//Parcelles </span></span></span></span><span style="vertical-align: inherit;"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">TIRAGE( ob ) </span></span></span></span><span style="vertical-align: inherit;"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">DRAWHLINE(os) </span></span></span></span><span style="vertical-align: inherit;"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">STYLE DRAWHLINE(50) (DOTTEDLINE3) </span></span></span></span><span style="vertical-align: inherit;"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">renvoie smoothRSI comme "RSI Lissé"</span></span></span></span>11/23/2023 at 12:32 AM #224181123456789101112131415161718//Vidya//Period = 14if barindex>100 thenk=abs(Chandle[20](close))/100alfa=2/(14+1)vidya=(alfa*k*close+(1-alfa*k)*vidya[1])endif//return vidya, Close//smoothRSI = average[val, aver](RSI[rsival])smoothrsi= average [14,vidya] (RSI[rsival])//PlotsDRAWHLINE(ob )DRAWHLINE(os )DRAWHLINE(50) STYLE (DOTTEDLINE3)return smoothRSI as "RSI Lissé"11/23/2023 at 11:19 PM #224217Hi,
I think you should replace the “Close” with the “RSI”…
Vidya RSI12345678910Period = 14xRSI=RSI[14](Close)if barindex>100 thenk=abs(Chandle[20](xRSI))/100alfa=2/(Period+1)vidya=(alfa*k*xRSI+(1-alfa*k)*vidya[1])endifDrawHLine(70) Coloured("Blue")DrawHLine(30) Coloured("Blue")return vidya Coloured("Red"), xRSI11/24/2023 at 10:32 AM #224232Merci beaucoup JS pour la réponse.
cela n’est pas exactement ce que j’attendais mais cela m’aide bien 🙂
Dans mon, code (line11), ce que je voudrais c’est appliquer la Vidya pour avoir un rsi “smooth” : smoothrsi = Average [ 14 ,vidya ] ( RSI [ rsival ] ) ???
Merci beaucoup !
1 user thanked author for this post.
11/24/2023 at 5:48 PM #22426411/24/2023 at 6:20 PM #224267Merci beaucoup pour le temps passé 🙂
je comprends que ma question n’est pas tres claire.
Votre réponse m’a déjà fait beaucoup progresser…
ce que je voudrai c’est que la Vidya ne soit pas “sur” le RSI mais “dans” le calcul du RSI… mais ca n’est peut être pas clair 🙁
Merci infiniment en tout cas pour le temps passé
1 user thanked author for this post.
-
AuthorPosts
Find exclusive trading pro-tools on