LIGNE MEDIANE PIVOT: PROBLEME D’AFFICHAGE
Forums › ProRealTime forum Français › Support ProBuilder › LIGNE MEDIANE PIVOT: PROBLEME D’AFFICHAGE
- This topic has 8 replies, 2 voices, and was last updated 2 years ago by
christophe11560.
-
-
09/08/2022 at 11:53 AM #200358
Bonjour à tous,
J’ai créé un indicateur, une ligne médiane sur graphique entre sommet et creux mineur.
J’ai un soucis d’affichage. J’ai une trainasse qui apparaît en bout de ligne.
J’ai ce problème lorsque j’utilise la fonction “defparam calculateonlastbars”.
Je l’utilise pour ne pas ralentir le logiciel.
J’ai le même problème pour des indicateurs similaires.Existe t’il une solution pour éviter d’avoir cette trainasse sans avoir à supprimer la fonction “defparam calculateonlastbars” ou sans ralentir le logiciel?
en vous remerciant 😉
christophe09/08/2022 at 11:54 AM #200360code ligne mediane123456789101112defparam calculateonlastbars = 500haut=high<high[1] and high[1]>high[2]bas=low>low[1] and low[1]<low[2]if haut thensommet=high[1]elsif BAS thencreux=Low[1]endifmediane= (sommet+creux)/2return Mediane as "LIGNE MEDIANE ENTRE SOMMET-CREUX"09/08/2022 at 12:03 PM #20036309/08/2022 at 12:08 PM #200364Bonjour Nicolas,
je ne comprends pas “passe de rien du tout (0) à une valeur”.
La médiane se dessine bien de 0 à 500 bars mais arrivé à 500 bars de “defparam calculateonlastbars = 500” j’ai une trainasse.
09/08/2022 at 5:29 PM #20037609/08/2022 at 6:07 PM #200381ok je comprends.
Est ce que tu connais une solution pour palier à ce désagrément sans ralentir le logiciel?
09/09/2022 at 10:33 AM #200410En ajoutant cette condition, cela améliore l’affichage (plus de valeur à 0) mais ne règle pas complètement le problème.
if (mediane <> 0) then
imediane=mediane
else
imediane=(highest[5](high)+lowest[5](low))/2
endifComment puis je l’améliorer?
proposition à améliorer12345678910111213141516171819defparam calculateonlastbars = 500haut=high<high[1] and high[1]>high[2]bas=low>low[1] and low[1]<low[2]if haut thensommet=high[1]elsif BAS thencreux=Low[1]endifmediane= (sommet+creux)/2if (mediane <> 0) thenimediane=medianeelseimediane=(highest[5](high)+lowest[5](low))/2endifreturn iMediane as "LIGNE DE PIVOT ENTRE SOMMET-CREUX"09/09/2022 at 10:58 AM #200415Avec cette version on s’assure que mediane existe, sinon on utilise le close:
12345678910111213141516171819202122defparam calculateonlastbars = 500haut=high<high[1] and high[1]>high[2]bas=low>low[1] and low[1]<low[2]if haut thensommet =high[1]elsif BAS thencreux = Low[1]endifif (sommet >0 and creux>0 ) thenmediane = (sommet+creux)/2endifif mediane[1] thenimediane=medianeelseimediane=closeendifreturn iMediane as "LIGNE DE PIVOT ENTRE SOMMET-CREUX"1 user thanked author for this post.
09/09/2022 at 1:12 PM #200426TU ME SAUVES LA VIE 😉
Merci beaucoup Nicolas
christophe
-
AuthorPosts
Find exclusive trading pro-tools on