DPO borné 0 à 100
Forums › ProRealTime forum Français › Support ProBuilder › DPO borné 0 à 100
- This topic has 3 replies, 2 voices, and was last updated 2 years ago by
Nicolas.
Viewing 4 posts - 1 through 4 (of 4 total)
-
-
04/27/2022 at 8:55 PM #192348
Bonjour,
Est-il possible de borner le DPO de zéro à 100? comme un RSI par exemple…
J’ai collé le code du DPO de Nicolas
D’avance merci pour vos réponses
Arnaud12345678910// **** DPO of past moving average and not future ones :p = p1avg = average[p](customclose)r = round(p/2) +1b = customclose - avg[r]myDPO = bRETURN myDPO as "Detrented Price Oscillator of past datas", 0 coloured(10,10,255) as "0"04/28/2022 at 8:32 AM #192352Pour cela il faut le normaliser, donc choisir une période de normalisation que j’ai appelé “period” dans le code ci-dessous.
123456789101112131415// **** DPO stochasticp = 10avg = average[p](customclose)r = round(p/2) +1b = customclose - avg[r]//normalisationperiod = 100hh = highest[period](b)ll = lowest[period](b)norm = (b-ll)/(hh-ll)*100RETURN normC’est donc la stochastique du DPO.
04/28/2022 at 11:08 AM #19236504/28/2022 at 3:16 PM #192371 -
AuthorPosts
Viewing 4 posts - 1 through 4 (of 4 total)