HA NORMALISES A ZERO
Forums › ProRealTime forum Français › Support ProBuilder › HA NORMALISES A ZERO
- This topic has 35 replies, 2 voices, and was last updated 3 years ago by
supertiti.
-
-
01/26/2022 at 1:17 PM #186652
Bonjour à tous,
Serait-il possible de placer tous les “drawpoints” sur la ligne de zéro afin de pouvoir intégrer cet indicateur sur un autre borné de 0 à 100.
merci de votre aide
bonne journée et bons trades
HA normalisés à zero123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960// HEIKIN ASHI TRANSPARENTS ROBERTO V1 25.01.2022// cul plat Nicolas 07.01.2022defparam CALCULATEONLASTBARS = 100xClose = (open+high+low+close)/4IF BarIndex=0 THENxOpen = openxHigh = highxLow = lowELSexOpen = (xOpen[1] + xClose[1])/2xHigh = Max(Max(high, xOpen), xClose)xLow = Min(Min(low, xOpen), xClose)ENDIFgreen = xopen<xclose and xlow=xopenred = xopen>xclose and xhigh=xopengreensum = summation[5](xClose > xOpen) = 5redsum = summation[5](xClose < xOpen) = 5////////////////////////////////////////////////////if green and not green[1] thenlastpointx = 1IF lastpointx <> lastpointx[1] THENdrawpoint(barindex,xlow,5) coloured (9,82,40,255) // greenENDIFelsif red and not red[1] thenlastpointx = 2IF lastpointx <> lastpointx[1] THENdrawpoint(barindex,xhigh,5) coloured(200,0,0,255)// redENDIFendif/////////////////////////////////////////////////OKif green > green [1] thenlastpointy = 1IF lastpointy <> lastpointy[1] THENdrawpoint(barindex,xlow,3) coloured (255,255,240)// IvoireENDIFelsif red > red [1] thenlastpointy = 2IF lastpointy <> lastpointy[1] THENdrawpoint(barindex,xhigh,3) coloured (255,255,240)// IvoireENDIFendif//IF close > open THENif greensum then //green > green [1] thenDrawCandle(xOpen,xHigh,xLow,xClose) coloured(0,255,0,0) //bordercolor(6,43,22) // vert clair bordure vert foncé//ELSEelsif redsum then //red > red [1] thenDrawCandle(xOpen,xHigh,xLow,xClose) coloured(255,0,255,0) //bordercolor(255,0,0) // rose magenta bordure rougeENDIFRETURN t// Variables :// t = 0// décocher heikin A transp Roberto V1// décocher Chandelier01/26/2022 at 3:50 PM #186662Serait-il possible de placer tous les “drawpoints” sur la ligne de zéro afin de pouvoir intégrer cet indicateur sur un autre borné de 0 à 100.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556// HEIKIN ASHI TRANSPARENTS ROBERTO V1 25.01.2022// cul plat Nicolas 07.01.2022defparam CALCULATEONLASTBARS = 1000base=0xClose = (open+high+low+close)/4IF BarIndex=0 THENxOpen = openxHigh = highxLow = lowELSexOpen = (xOpen[1] + xClose[1])/2xHigh = Max(Max(high, xOpen), xClose)xLow = Min(Min(low, xOpen), xClose)ENDIFgreen = xopen<xclose and xlow=xopenred = xopen>xclose and xhigh=xopengreensum = summation[5](xClose > xOpen) = 5redsum = summation[5](xClose < xOpen) = 5////////////////////////////////////////////////////if green and not green[1] thenlastpointx = 1IF lastpointx <> lastpointx[1] THENdrawpoint(barindex,base,5) coloured (9,82,40,255) // greenENDIFelsif red and not red[1] thenlastpointx = 2IF lastpointx <> lastpointx[1] THENdrawpoint(barindex,base,5) coloured(200,0,0,255)// redENDIFendif/////////////////////////////////////////////////OKif green > green [1] thenlastpointy = 1IF lastpointy <> lastpointy[1] THENdrawpoint(barindex,base,3) coloured (255,255,240)// IvoireENDIFelsif red > red [1] thenlastpointy = 2IF lastpointy <> lastpointy[1] THENdrawpoint(barindex,base,3) coloured (255,255,240)// IvoireENDIFendif//IF close > open THEN//if greensum then //green > green [1] then//DrawCandle(xOpen,xHigh,xLow,xClose) coloured(0,255,0,0) //bordercolor(6,43,22) // vert clair bordure vert foncé////ELSE//elsif redsum then //red > red [1] then//DrawCandle(xOpen,xHigh,xLow,xClose) coloured(255,0,255,0) //bordercolor(255,0,0) // rose magenta bordure rouge//ENDIF//DRAWPOINT(barindex, close, 2) coloured(255,0,0)RETURNJ’ai désactive Drawcandle et mis drawpoint sur zéro.
A priori ça donne le même résultat. Il y avait un “t” devant RETURN
01/26/2022 at 6:43 PM #18666801/29/2022 at 12:41 PM #186955Bonjour à tous
@ Khaled
En reprenant ton code de base 100, pourrais-t’on scinder cet indicateur en deux réponses (base 0 et base 100) pour avoir les signaux verts sur 0 et les rouges sur 100.
merci de ton retour
Bon week end
01/29/2022 at 4:17 PM #18700101/30/2022 at 11:11 AM #187048Voilà j’ai pris un RSI 14 sur le site Central Charts pour illustrer mon souhait.
l’enjeu est de placer les “drawpoints” sur les lignes 0 ou 100 selon leur couleur : vert sur 0 et rouge sur 100.
les points sur l’exemple ne sont pas les reflet de l’indicateur c’est juste pour montrer le principe.
Je joins le graphe de Sartorius
01/30/2022 at 11:47 AM #187051Tiens, essayes ça et dis moi si ça marche comme tu veux
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960// HEIKIN ASHI TRANSPARENTS ROBERTO V1 25.01.2022// cul plat Nicolas 07.01.2022defparam CALCULATEONLASTBARS = 1000baseUP=0baseDN=100xClose = (open+high+low+close)/4IF BarIndex=0 THENxOpen = openxHigh = highxLow = lowELSexOpen = (xOpen[1] + xClose[1])/2xHigh = Max(Max(high, xOpen), xClose)xLow = Min(Min(low, xOpen), xClose)ENDIFgreen = xopen<xclose and xlow=xopenred = xopen>xclose and xhigh=xopengreensum = summation[5](xClose > xOpen) = 5redsum = summation[5](xClose < xOpen) = 5////////////////////////////////////////////////////if green and not green[1] thenlastpointx = 1IF lastpointx <> lastpointx[1] THENdrawpoint(barindex,baseUP,5) coloured (9,82,40,255) // greenENDIFelsif red and not red[1] thenlastpointx = 2IF lastpointx <> lastpointx[1] THENdrawpoint(barindex,baseDN,5) coloured(200,0,0,255)// redENDIFendif/////////////////////////////////////////////////OKif green > green [1] thenlastpointy = 1IF lastpointy <> lastpointy[1] THENdrawpoint(barindex,baseUP,3) coloured (255,255,240)// IvoireENDIFelsif red > red [1] thenlastpointy = 2IF lastpointy <> lastpointy[1] THENdrawpoint(barindex,baseDN,3) coloured (255,255,240)// IvoireENDIFendifiRSI = RSI[14](close)//IF close > open THEN//if greensum then //green > green [1] then//DrawCandle(xOpen,xHigh,xLow,xClose) coloured(0,255,0,0) //bordercolor(6,43,22) // vert clair bordure vert foncé////ELSE//elsif redsum then //red > red [1] then//DrawCandle(xOpen,xHigh,xLow,xClose) coloured(255,0,255,0) //bordercolor(255,0,0) // rose magenta bordure rouge//ENDIF//DRAWPOINT(barindex, close, 2) coloured(255,0,0)RETURN iRSI, 0, 10001/30/2022 at 12:33 PM #187058Khaled Champion du monde ! ton code fonctionne au mieux, c’est exactement ce que je souhaitais.
Je joins un graphe de Sartorius où il semblerait opportun d’être à l’achat
merci encore pour ton aide appréciée
Bon dimanche
HA KHALED 0 10012345678910111213141516171819202122232425262728293031323334353637383940414243444546474849// HA KHALED 0 100 le 30.01.2022// HEIKIN ASHI TRANSPARENTS ROBERTO V1 25.01.2022// cul plat Nicolas 07.01.2022defparam CALCULATEONLASTBARS = 100baseUP=0baseDN=100xClose = (open+high+low+close)/4IF BarIndex=0 THENxOpen = openxHigh = highxLow = lowELSexOpen = (xOpen[1] + xClose[1])/2xHigh = Max(Max(high, xOpen), xClose)xLow = Min(Min(low, xOpen), xClose)ENDIFgreen = xopen<xclose and xlow=xopenred = xopen>xclose and xhigh=xopengreensum = summation[5](xClose > xOpen) = 5redsum = summation[5](xClose < xOpen) = 5////////////////////////////////////////////////////if green and not green[1] thenlastpointx = 1IF lastpointx <> lastpointx[1] THENdrawpoint(barindex,baseUP,5) coloured (9,82,40,255) // greenENDIFelsif red and not red[1] thenlastpointx = 2IF lastpointx <> lastpointx[1] THENdrawpoint(barindex,baseDN,5) coloured(200,0,0,255)// redENDIFendif/////////////////////////////////////////////////OKif green > green [1] thenlastpointy = 1IF lastpointy <> lastpointy[1] THENdrawpoint(barindex,baseUP,3) coloured (255,255,240)// IvoireENDIFelsif red > red [1] thenlastpointy = 2IF lastpointy <> lastpointy[1] THENdrawpoint(barindex,baseDN,3) coloured (255,255,240)// IvoireENDIFendifRETURN 0 , 10001/31/2022 at 6:17 PM #18713901/31/2022 at 6:21 PM #18714101/31/2022 at 6:23 PM #18714301/31/2022 at 6:26 PM #18714401/31/2022 at 6:31 PM #187146@ Khaled
Si tu sens bien l’affaire je suis partant pour un screener Up et un DOWN , j’ai essayé mais c’est pas trop concluant : il me donne bien les points mais pas toujours sur le dernier jour de cotation.
Ce qui m’intéresse ce sont les signaux de début de tendance ( comme tout le monde je pense) donc du dernier jour de cotation.
01/31/2022 at 6:34 PM #18714901/31/2022 at 6:34 PM #187150 -
AuthorPosts