MarketProfile Live Alerte et Screener
Forums › ProRealTime forum Français › Support ProBuilder › MarketProfile Live Alerte et Screener
- This topic has 5 replies, 3 voices, and was last updated 8 months ago by Sofitech.
-
-
02/26/2024 at 4:20 PM #228774
Bonjour à tous,
J’observe avec intérêt cet indicateur de la librairie:
https://www.prorealcode.com/prorealtime-indicators/marketprofilelive/J’aimerais créer un histogramme sous prix mentionnant +1 lorsqu’un flèche verte est créée et -1 lorsqu’une flèche rouge est créée. Cela permettrait la création d’alerte et screener.
Les autres aspects du code pourront être conservés mais ne pas être graphiquement représentés.
Si quelqu’un peut m’aider à sortir ce code, ce serait extra.
Ci-dessous le code indicateur :123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268defparam drawonlastbaronly=trueonce basculejour=1once conte=0once count=0atr=AverageTrueRange[14](close)cont=period+countStopLookback=periodvoltot=0pricelevel=0nb=1hh = Highest[cont](High)ll = Lowest[cont](Low)checkprice = llMaxTouch1 = 0if IsLastBarUpdate thenFor j = 1 To nb doCOUNT = COUNT+1for k = 0 To cont-1 doind=0 //reset index of array//get the price touch occurrences for each levelwhile checkprice<=hh dotouch=0 //reset price touch for this price levelfor m = 0 to cont-1 doif High[cont*(j-1)+m]>=checkprice and Low[cont*(j-1)+m]<=checkprice thentouch=touch+1$hm[ind] = touchendifnextif $hm[ind] > MaxTouch1 thenMaxTouch1 = $hm[ind]MaxTouch2 = checkpricevoltot=MaxTouch2endifCL=(hh+ll)/2StdDev = (hh- ll) / 2VX=0.7VAH=CL + StdDev *vxVAL=CL - StdDev * VX//define colorr = min($hm[ind]*10,255)//plot the resultif marketEtHeamap=1 then//drawtext("█",barindex+5+x,checkprice) coloured(r,0,0)//drawtext("#touch#",barindex+20+x,checkprice,SansSerif,Standard,10) coloured(110,110,110)if step>5 thenendifdrawrectangle(barindex[cont]-touch/(dist),checkprice-step/2,barindex[cont],checkprice+step/2)coloured(0,r,130,alpha)bordercolor(200,r,0,10)endifif touch<=1 thendrawrectangle(barindex+5,checkprice-step/2,barindex[cont],checkprice+step/2)coloured(110,110,110,alpha)bordercolor(200,r,0,10)endifcheckprice=checkprice+step //increase price check for next roundind=ind+1 //increase array indexwendDrawText("#cont#",Barindex[cont+1]+x,hh+atr,Dialog,Bold,30) coloured(0,0,0,250)DRAWsegment(barindex-5-x, MaxTouch2, Barindex[cont], MaxTouch2) coloured(r,0,150,250)style(line,3)DRAWsegment(barindex-5-x, VAH, Barindex[cont], VAH) coloured(0,130,0,250)style(line,3)DRAWsegment(barindex-5-x, VAL, Barindex[cont], VAL) coloured(250,0,0,250)style(line,3)nextnextendifO=dopen(0)c=dclose(0)drawrectangle(Barindex[cont+1], o,Barindex[cont]+1, close) coloured(255,55,150,250) bordercolor(210,210,210,50)drawtext("O ➤---",Barindex[cont]+x,o*pipsize,Dialog,Standard,10) coloured(0,0,210,250)drawtext("C ➤---",Barindex[cont]+x,c*pipsize,Dialog,Standard,10) coloured(0,0,210)drawtext("VAH",Barindex[cont]+x, VAH*pipsize,Dialog,Standard,10) coloured(0,0,210,250)drawtext("VAL",Barindex[cont]+x, VAL*pipsize,Dialog,Standard,10) coloured(0,0,210,250)//drawtext("VAL",coordX+45, val) anchor(MIDDLE ,xshift,value)coloured(r,0,0)if IsLastBarUpdate thenFor j = 1 To nb dofor i = 1 To StopLookback-1 doIF High[StopLookback*(j-1)+i]=hh[(j-1)*StopLookback] Then//hh=High[StopLookback*(j-1)+i]HighestI = BarIndex[StopLookback*(j-1)+i]//DRAWTEXT(hh[(j-1)*StopLookback]-x, HighestI, hh[(j-1)*StopLookback]+20, Dialog, Standard, 12) COLOURED(0,255,0)//DRAWARROWDOWN(HighestI-x,hh[(j-1)*StopLookback]+5) COLOURED(0,255,00)endifIF Low[StopLookback*(j-1)+i]=ll[(j-1)*StopLookback] Then//ll=Low[StopLookback*(j-1)+i]LowestI = BarIndex[StopLookback*(j-1)+i]//DRAWTEXT(ll[(j-1)*StopLookback]-x, LowestI, ll[(j-1)*StopLookback]-20, Dialog, Standard, 12) COLOURED(200,0,0)//DRAWARROWUP(LowestI-x,ll[(j-1)*StopLookback]-5) COLOURED(255,0,00)endifnextnextendifdrawrectangle(barindex[cont],hh,barindex+4,ll)coloured(0,r,130,1)bordercolor(200,r,0,alpha)debutN = 150500finN = 153500// TRACE DU RECTANGLE DE L'OPR USIF time = debutN THENhautN = 0basN = 0barredebutN = barindexENDIFIF time = finN THENbarrefinN = barindexENDIFIF time >= debutN AND time <= finN THENIF high > hautN THENhautN = highENDIFIF low < basN OR time = debutN THENbasN = lowENDIFdifN = round(abs(hautN-basN))ENDIFif OPR=1 thenIF time >= finN THENDrawText(" OPR H #difn#pts",barredebutN,hautN+4*pointsize,Dialog,Bold,10) coloured(0,0,0,250)DrawText(" OPR B",barredebutN,basN+4*pointsize,Dialog,Bold,10) coloured(0,0,0,250)drawsegment(barredebutN,hautN,Barindex,hautN) coloured(0,0,0,50) STYLE (dottedline,2)DRAWRECTANGLE(barredebutN,hautN,barrefinN,basN) coloured(0,0,255,Alpha)bordercolor(0,0,255,Alpha)drawsegment(barredebutN,basN,Barindex,basN) coloured(0,0,0,50) STYLE (dottedline,2)ENDIFendif// heures de sessiondebut = 010000fin = 090000dA = 010000fA = 013000// ... (le reste de votre script)// TRACE Le AdA = 010000fA = 013000barA=barindexi = 0if OpenTime =dA and basculejour=1 thenfor i = 1 * pipsize to 6 * pipsizeHA=close[i]NEXTendif// TRACE DU RECTANGLE DE SESSION ASIATIQUEIF time = debut THENhaut = 0bas = 0barredebut = barindexENDIFIF time = fin THENbarrefin = barindexENDIFIF time >= debut AND time <= fin THENIF high > haut THENhaut = highENDIFIF low < bas OR time = debut THENbas = lowENDIFdif = round(abs(haut-bas))ENDIFif asiatic=1 thenIF time >= fin THENDrawText(" Haut asiatique #dif#pts",barredebut,haut+4*pointsize,Dialog,Bold,10) coloured(0,0,0,250)DrawText(" Bas asiatique",barredebut,bas+4*pointsize,Dialog,Bold,10) coloured(0,0,0,250)drawsegment(barredebut,haut,Barindex,haut) coloured(0,0,0,50) STYLE (dottedline,2)DRAWRECTANGLE(barredebut,haut,barrefin,bas) coloured(255,255,0,50)bordercolor(255,255,0,1)drawsegment(barredebut,bas,Barindex,bas) coloured(0,0,0,50) STYLE (dottedline,2)ENDIFendifdebutL = 143500finL = 153500// TRACE DU RECTANGLE DE SESSION ASIATIQUEIF time = debutL THENhautL = 0basL = 0barredebutL = barindexENDIFIF time = finL THENbarrefinL = barindexENDIFIF time >= debutL AND time <= finL THENIF high > hautL THENhautL = highENDIFIF low < basL OR time = debutL THENbasL = lowENDIFdifL = round(abs(hautL-basL))ENDIFif Imbalance=1 thenIF time >= finL THENDrawText(" Haut Imbalance #difL#pts",barredebutL,hautL+4*pointsize,Dialog,Bold,10) coloured(0,0,0,250)DrawText(" Bas Imbalance",barredebutL,basL+4*pointsize,Dialog,Bold,10) coloured(0,0,0,250)drawsegment(barredebutL,hautL,Barindex[period],hautL) coloured(0,0,0,50) STYLE (dottedline,2)DRAWRECTANGLE(barredebutL,hautL,barrefinL,basL) coloured(0,255,0,Alpha)bordercolor(0,255,0,Alpha)drawsegment(barredebutL,basL,Barindex[period],basL) coloured(0,0,0,50) STYLE (dottedline,2)ENDIFendifif IsLastBarUpdate thenFor j = 1 To nb dofor i = 1 To StopLookback-1 doIF High[StopLookback*(j-1)+i]=hh[(j-1)*StopLookback] Then//hh=High[StopLookback*(j-1)+i]HighestI = BarIndex[StopLookback*(j-1)+i]DRAWTEXT(hh[(j-1)*StopLookback], HighestI, hh[(j-1)*StopLookback]+15, Dialog, Standard, 12) COLOURED(0,255,0)DRAWARROWDOWN(HighestI,hh[(j-1)*StopLookback]+2) COLOURED(0,255,00)endifIF Low[StopLookback*(j-1)+i]=ll[(j-1)*StopLookback] Then//ll=Low[StopLookback*(j-1)+i]LowestI = BarIndex[StopLookback*(j-1)+i]DRAWTEXT(ll[(j-1)*StopLookback], LowestI, ll[(j-1)*StopLookback]-15, Dialog, Standard, 12) COLOURED(200,0,0)DRAWARROWUP(LowestI,ll[(j-1)*StopLookback]-2) COLOURED(255,0,00)endifnextnextendif// Paramètresperiode = 20 // Periode pour les calculs// Calcul des moyennes mobilesmoyenneHaut = Average[periode](high)moyenneBas = Average[periode](low)volumeTotal = Average[periode](volume)// Estimation de la Value AreaVAH = moyenneHaut // Estimation de Value Area HighVAL = moyenneBas // Estimation de Value Area Low// Dessiner la Value AreaDRAWLINE(BarIndex[periode], VAH, BarIndex, VAH) COLOURED(0, 255, 0) // Ligne verte pour la VAHDRAWLINE(BarIndex[periode], VAL, BarIndex, VAL) COLOURED(255, 0, 0) // Ligne rouge pour la VALreturn02/27/2024 at 12:11 PM #228818En fait je sais comment supprimer les éléments graphiques et créer l’histogramme. Par contre, même en faisant ces modifications, l’indicateur s’affiche sur le graphique prix et non en dessous.
Je ne vois pas quoi modifier pour que l’indicateur modifié s’affiche sur une fenêtre en dessous et non pas sur le graphique prix.
Si quelqu’un peut aider…
02/27/2024 at 12:34 PM #22882102/27/2024 at 1:00 PM #22882402/27/2024 at 3:16 PM #22884202/27/2024 at 4:06 PM #228847 -
AuthorPosts
Find exclusive trading pro-tools on