Signaux contradictoires dashboard et histo
Forums › ProRealTime forum Français › Support ProBuilder › Signaux contradictoires dashboard et histo
- This topic has 3 replies, 2 voices, and was last updated 5 years ago by Nicolas.
-
-
02/21/2019 at 10:31 AM #91905
Bonjour Nicolas,
Lorsque je mets un signal de trend en histogramme et en dashboard seul, les signaux correspondent.
Si je mets exactement le même code dans un dashboard avec un autre code de signal, le signal de trend n’est plus correct.
Comment est-ce possible?
Je joins en attaché une image pour mieux comprendre et le code du trend.
Merci de ton aide.
Phil4910
Code trend dashboard1234567891011121314151617181920212223defparam drawonlastbaronly=trueXoffset = 20// --- settings Tendancez1=Average[20](close)if close>z1 and open<>z1 and z1>z1[1] thenr=1elsif close<z1 and open<>z1 and z1<z1[1] thenr=-1elser=0endif// --- end of settings//labelDRAWTEXT("TREND:",barindex-Xoffset,0.1,SansSerif,Bold,16)coloured(230,230,250)If r=1 thendrawtext("UP ▲",barindex-10,0.1,SansSerif,Bold,16)coloured(30,144,255)Elsif r=-1 thendrawtext("DOWN ▼",barindex-10,0.1,SansSerif,Bold,16)coloured(255,48,48)Elsif r=0 thendrawtext("NEUTRAL ■",barindex-10,0.1,SansSerif,Bold,16)coloured(180,180,0)endif02/21/2019 at 12:52 PM #9192102/21/2019 at 4:15 PM #91937Voici le dashboard avec les 2 codes ensemble dans lequel le signal est correct mais pas le trend
Dashboard12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758defparam drawonlastbaronly=trueXoffset = 20// --- settings Tendancez1=Average[20](close)if close>z1 and open<>z1 and z1>z1[1] thenr=1elsif close<z1 and open<>z1 and z1<z1[1] thenr=-1elser=0endif// --- end of settings//labelDRAWTEXT("TREND:",barindex-Xoffset,0.1,SansSerif,Bold,16)coloured(230,230,250)If r=1 thendrawtext("UP ▲",barindex-5,0.1,SansSerif,Bold,16)coloured(30,144,255)Elsif r=-1 thendrawtext("DOWN ▼",barindex-5,0.1,SansSerif,Bold,16)coloured(255,48,48)Elsif r=0 thendrawtext("NEUTRAL ■",barindex-5,0.1,SansSerif,Bold,16)coloured(180,180,0)endif// --- settings Signalz1=ExponentialAverage[8](close)z2 =Average[20](close)e= z1 - z2If z1<z2 and z1>z1[1] and e>=e[1] and close>open thenr=1elsif z1<z2 and z1<z1[1]and e<=e[1]and close<open thenr=-2elsif z1>z2 and z1>z1[1]and e>=e[1]and close>open thenr=2elsif z1>z2 and z1<z1[1] and e<=e[1]and close<open thenr=-1elser=0endif// --- end of settings//labelDRAWTEXT("SIGNAL:",barindex-Xoffset,-0.5,SansSerif,Bold,16)coloured(230,230,250)If r=1 thendrawtext("LIGHT BUY ▲",barindex-5,-0.5,SansSerif,Bold,16)coloured(30,144,255)Elsif r=2 thendrawtext("BUY ▲▲",barindex-6,-0.5,SansSerif,Bold,16)coloured(30,144,255)Elsif r=-1 thendrawtext("LIGHT SELL ▼",barindex-5,-0.5,SansSerif,Bold,16)coloured(255,48,48)Elsif r=-2 thendrawtext("SELL ▼▼",barindex-6,-0.5,SansSerif,Bold,16)coloured(255,48,48)elsif r=0 thenDRAWTEXT("No signal, wait..",barindex-3,-0.5,SansSerif,Bold,16)coloured(180,180,0)endifReturn02/24/2019 at 9:05 AM #92168La variable nommée “r” étant utilisé pour les 2 indications “trend” et “signal”, je te suggère d’en utiliser une autre pour bien séparer les conditions. Sans aller plus loin dans les vérifications exhaustives de tes conditions, je pense que cette solution devrait régler le problème 🙂
-
AuthorPosts
Find exclusive trading pro-tools on