Bug Affichage Pivot 1heure
Forums › ProRealTime forum Français › Support ProBuilder › Bug Affichage Pivot 1heure
- This topic has 18 replies, 2 voices, and was last updated 3 years ago by Ichimoku Reading.
-
-
02/10/2021 at 2:36 PM #160939
Comme tu n’utilises pas “updateonclose” pour le timeframe 1 hour, les infos sont updatés à chaque fermeture de bougie du timeframe courant (default). Fait un
1RETURN LL,HH,CCpour voir les valeurs qui sont récupérés lors d’un trou de cotation, ça pourrait nous donner une piste.
02/11/2021 at 4:37 AM #161009Les valeurs sont retourné sans erreur donc c’est ok, sauf pour le lundi 8 janvier x)
En revanche, pour la projection en avant des DrawSegment, j’utilise ce code :
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171////=/===============/=//=/===============/=//=/ Paramettre de Base//defparam drawonlastbaronly = trueMiddle = 0Text = 1TextMiddle = 0////=/===============/=//=/===============/=//=/ Pivot//timeframe(1hour)//=/ H & L & CLL = low[1]HH = high[1]CC = close[1]//=/ S & R & PPP = (LL+HH+CC)/3//=//Rx1 = 2 * PP-LLHx1 = (Rx1 + PP) /2Rx2 = PP + (HH-LL)Hx2 = (Rx2 + Rx1) /2Rx3 = Rx2 + (Rx1-PP)Hx3 = (Rx3 + Rx2) /2Rx4 = Rx3 + (Rx2-PP)Hx4 = (Rx4 + Rx3) /2//=//Sx1 = 2 * PP-HHLx1 = (Sx1 + PP) /2Sx2 = PP - (HH-LL)Lx2 = (Sx2 + Sx1) /2Sx3 = Sx2 - (PP-Sx1)Lx3 = (Sx3 + Sx2) /2Sx4 = Sx3 - (PP-Sx2)Lx4 = (Sx4 + Sx3) /2//=/ Signalif barindex > barindex[1] thenSL = 1endif//=//if SL[1] = 1 thenSL = 0endiftimeframe(default)//=/ Lecture du signalif (SL = 1 and SL[1] = 0) or (SL = 0 and SL[1] = 1) thenTH = 1elseTH = 0endif//=/ Décompte des barindexDC = 1if TH = 0 thenDC = DC[1]+1endif////=/===============/=//=/===============/=//=/ Couleur Pivot////=/ choix des couleur : https://htmlcolorcodes.com/fr///=/ Couleur RésistanceRxR = 255 // Ref 1GxR = 0 // Ref 2BxR = 0 // Ref 3TxR = 255 // opacité de 0 a 255//=/ Couleur SupportRxS = 0 //.....GxS = 128BxS = 0TxS = 255//=/ Couleur PivotRxP = 0GxP = 0BxP = 0TxP = 255////=/===============/=//=/===============/=//=/ Visuel Pivot//ZZ = (Hx1-PP)/8if DC => 1 then//=/ Point Pivotdrawsegment(barindex[DC-1],PP,barindex+((DC[DC])-DC+1),PP) coloured(RxP,GxP,BxP,TxP) style(line,2)//choix style : Line_DottedLine_Point (2 = taille)//=/ Résistancedrawsegment(barindex[DC-1],Rx1,barindex+((DC[DC])-DC+1),Rx1) coloured(RxR,GxR,BxR,TxR) style(dottedline,2)//.....drawsegment(barindex[DC-1],Rx2,barindex+((DC[DC])-DC+1),Rx2) coloured(RxR,GxR,BxR,TxR) style(dottedline,2)drawsegment(barindex[DC-1],Rx3,barindex+((DC[DC])-DC+1),Rx3) coloured(RxR,GxR,BxR,TxR) style(dottedline,2)drawsegment(barindex[DC-1],Rx4,barindex+((DC[DC])-DC+1),Rx4) coloured(RxR,GxR,BxR,TxR) style(dottedline,2)//=/ Supportdrawsegment(barindex[DC-1],Sx1,barindex+((DC[DC])-DC+1),Sx1) coloured(RxS,GxS,BxS,TxS) style(dottedline,2)drawsegment(barindex[DC-1],Sx2,barindex+((DC[DC])-DC+1),Sx2) coloured(RxS,GxS,BxS,TxS) style(dottedline,2)drawsegment(barindex[DC-1],Sx3,barindex+((DC[DC])-DC+1),Sx3) coloured(RxS,GxS,BxS,TxS) style(dottedline,2)drawsegment(barindex[DC-1],Sx4,barindex+((DC[DC])-DC+1),Sx4) coloured(RxS,GxS,BxS,TxS) style(dottedline,2)if Middle then//=/ Résistance Middledrawsegment(barindex[DC-1],Hx1,barindex+((DC[DC])-DC+1),Hx1) coloured(RxR,GxR,BxR,TxR) style(dottedline,1)//.....drawsegment(barindex[DC-1],Hx2,barindex+((DC[DC])-DC+1),Hx2) coloured(RxR,GxR,BxR,TxR) style(dottedline,1)drawsegment(barindex[DC-1],Hx3,barindex+((DC[DC])-DC+1),Hx3) coloured(RxR,GxR,BxR,TxR) style(dottedline,1)drawsegment(barindex[DC-1],Hx4,barindex+((DC[DC])-DC+1),Hx4) coloured(RxR,GxR,BxR,TxR) style(dottedline,1)//=/ Support Middledrawsegment(barindex[DC-1],Lx1,barindex+((DC[DC])-DC+1),Lx1) coloured(RxS,GxS,BxS,TxS) style(dottedline,1)drawsegment(barindex[DC-1],Lx2,barindex+((DC[DC])-DC+1),Lx2) coloured(RxS,GxS,BxS,TxS) style(dottedline,1)drawsegment(barindex[DC-1],Lx3,barindex+((DC[DC])-DC+1),Lx3) coloured(RxS,GxS,BxS,TxS) style(dottedline,1)drawsegment(barindex[DC-1],Lx4,barindex+((DC[DC])-DC+1),Lx4) coloured(RxS,GxS,BxS,TxS) style(dottedline,1)endifif Text then//=/ Point Pivotdrawtext("Piv 1h",barindex+((DC[DC])-DC+1),PP+ZZ,Dialog,Bold,11) coloured(RxP,GxP,BxP,TxP)//=/ Résistancedrawtext("R1 1h",barindex+((DC[DC])-DC+1),Rx1+ZZ,Dialog,Bold,11) coloured(RxR,GxR,BxR,TxR)drawtext("R2 1h",barindex+((DC[DC])-DC+1),Rx2+ZZ,Dialog,Bold,11) coloured(RxR,GxR,BxR,TxR)drawtext("R3 1h",barindex+((DC[DC])-DC+1),Rx3+ZZ,Dialog,Bold,11) coloured(RxR,GxR,BxR,TxR)drawtext("R4 1h",barindex+((DC[DC])-DC+1),Rx4+ZZ,Dialog,Bold,11) coloured(RxR,GxR,BxR,TxR)//=/ Supportdrawtext("S1 1h",barindex+((DC[DC])-DC+1),Sx1+ZZ,Dialog,Bold,11) coloured(RxS,GxS,BxS,TxS)drawtext("S2 1h",barindex+((DC[DC])-DC+1),Sx2+ZZ,Dialog,Bold,11) coloured(RxS,GxS,BxS,TxS)drawtext("S3 1h",barindex+((DC[DC])-DC+1),Sx3+ZZ,Dialog,Bold,11) coloured(RxS,GxS,BxS,TxS)drawtext("S4 1h",barindex+((DC[DC])-DC+1),Sx4+ZZ,Dialog,Bold,11) coloured(RxS,GxS,BxS,TxS)endifif TextMiddle then//=/ Résistance Middledrawtext("mR1 1h",barindex+((DC[DC])-DC+1),Hx1+ZZ,Dialog,Bold,11) coloured(RxR,GxR,BxR,TxR)drawtext("mR2 1h",barindex+((DC[DC])-DC+1),Hx2+ZZ,Dialog,Bold,11) coloured(RxR,GxR,BxR,TxR)drawtext("mR3 1h",barindex+((DC[DC])-DC+1),Hx3+ZZ,Dialog,Bold,11) coloured(RxR,GxR,BxR,TxR)drawtext("mR4 1h",barindex+((DC[DC])-DC+1),Hx4+ZZ,Dialog,Bold,11) coloured(RxR,GxR,BxR,TxR)//=/ Support Middledrawtext("mS1 1h",barindex+((DC[DC])-DC+1),Lx1+ZZ,Dialog,Bold,11) coloured(RxS,GxS,BxS,TxS)drawtext("mS2 1h",barindex+((DC[DC])-DC+1),Lx2+ZZ,Dialog,Bold,11) coloured(RxS,GxS,BxS,TxS)drawtext("mS3 1h",barindex+((DC[DC])-DC+1),Lx3+ZZ,Dialog,Bold,11) coloured(RxS,GxS,BxS,TxS)drawtext("mS4 1h",barindex+((DC[DC])-DC+1),Lx4+ZZ,Dialog,Bold,11) coloured(RxS,GxS,BxS,TxS)endifendif////=/===============/=//=/===============/=//=/ Fin//return02/11/2021 at 4:42 AM #161011Donc en gros, le signal donne 60 si il reste 60 bougie avant la prochaine heure, quand il y a un trou de cotation, le code de donne pas +1 mais +0
12345678910111213141516171819202122232425262728timeframe(1hour)//=/ Signalif barindex > barindex[1] thenSL = 1endif//=//if SL[1] = 1 thenSL = 0endiftimeframe(default)//=/ Lecture du signalif (SL = 1 and SL[1] = 0) or (SL = 0 and SL[1] = 1) thenTH = 1elseTH = 0endif//=/ Décompte des barindexDC = 1if TH = 0 thenDC = DC[1]+1endifreturn DC02/11/2021 at 4:52 AM #161012En fait, il ne donne pas +0, mais +rien.
Le code et comme simplement déporter a la barre suivante comme si le trou de cotation n’existe pas
L’utilisation de barindex > 1 ou barindex > barindex[1] ne change pas le problème
Je pourrais utiliser le temps, mais le code serrait utilisable sur une seul unité de temps si je vais ça.
Il doit bien exister une solution vu que PRT le fait…
-
AuthorPosts
Find exclusive trading pro-tools on