indicator showing “cup with handle” figures, associate this indicator with its “cup with handle” screener
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
defparam CALCULATEONLASTBARS=300 //variable searchzone=23 B5searchzone=searchzone//23 //nombre de bougies récentes où le plus haut est recherché P1Price = 0 for i = 0 to B5searchzone if high[i] > P1Price then P1Price = high[i] B5=i //de droite à gauche B5index = BarIndex[i] //B5 index de bougie où le plus haut a été trouvé endif next // En partant de B5 (le plus haut trouvé à l'étape précédente), trouver la bougie avec un plus haut égal ou inférieur à P1 et pour laquelle la bougie précédente (plus ancienne) a un plus haut supérieur à P1 ; soit B0 l'indice temps de cette bougie B0price=0 for j=B5 to B5+172 DO If high[j] <= P1Price and high[j+1] > P1Price then B0price=high[j] B0=j //de droite à gauche B0index=barindex[j] endif next // Soit P0 le plus bas entre B0 et B5 P0price = 10000 for k = B5 to B0 if low[k] < P0price then P0index=barindex[K] P0=k P0price = low[k] endif next // Noeuds du quadrillage B0B5=abs(B0-B5) boxheight = abs( P1price - P0price ) / 5 boxlength = round( (B0B5-0.5) / 5 ) reste=B0B5 MOD 5 B4= B5 + boxlength B4index=B5index-boxlength B3=B4+boxlength B3index= B4index-boxlength B2=B3+boxlength B2index=B3index-boxlength B1=B2+boxlength+reste B1index=B2index-boxlength-reste P1= P1price L0= P0price L1= P0price + boxheight L2 = P0price + 2 * boxheight L3 = P0price + 3 * boxheight L4 = P0price + 4 * boxheight flag=0 d=abs((b1-b4))+1 e=b4 deborde=highest[max(1,d)](close)[e] //if islastbarupdate then IF deborde<l3 THEN flag=1 endif //endif flag1=0 f=abs((b2-b3))+1 deborde1=highest[max(1,f)](close)[b3] IF deborde1<l2 THEN flag1=1 endif flagB0B1B4B5=0 fl=abs((b0-b1))+1 fm=abs((b4-b5))+1 lowdebordea=lowest[max(1,fl)](low)[b1] lowdebordeb=lowest[max(1,fm)](low)[b5] IF (lowdebordea or lowdebordeb) <(L2-(boxheight/3)) then flagB0B1B4B5=1 endif flagB1B2B3B4=0 fn=abs((b1-b2))+1 Fo=abs((b3-b4))+1 lowdebordec=lowest[max(1,fn)](low)[b2] lowdeborded=lowest[max(1,fo)](low)[b4] IF (lowdebordec or lowdeborded) <(L1-(boxheight/3)) then flagB1B2B3B4=1 endif lowdedans=0 lowdedans=(flagB0B1B4B5 or flagB1B2B3B4)>0 If barindex > B5index then plusgrandL2=summation[B5](low>L2)=0 endif trendhaussier=ExponentialAverage[4](close)[b0]>ExponentialAverage[4](close)[b0+5] or ExponentialAverage[4](close)[b0]>ExponentialAverage[4](close)[b0+10] or ExponentialAverage[4](close)[b0]>ExponentialAverage[4](close)[b0+15] or ExponentialAverage[4](close)[b0]>ExponentialAverage[4](close)[b0+20] or ExponentialAverage[4](close)[b0]>ExponentialAverage[4](close)[b0+25] cote=high>low lowanse=lowest[max(1,b5)](low) condition=flag=1 and flag1=1 and lowdedans=1 and plusgrandL2=0 and b0index<b5index and B0price>L3 and lowanse>((p1price-p0price)*0.5+(p0price)) if condition then DRAWRECTANGLE(B5INDEX,lowanse,Barindex,lowanse)coloured(192,192,192,55)FILLCOLOR(192,192,192,55) DRAWRECTANGLE(barindex,lowanse,Barindex,P1price)coloured(192,192,192,55)FILLCOLOR(192,192,192,55) DRAWRECTANGLE(B0INDEX,P0price,B0INDEX,P1price)coloured(192,192,192,55)FILLCOLOR(192,192,192,55) DRAWRECTANGLE(B0INDEX, L0, B5INDEX, L0)coloured(192,192,192,55)FILLCOLOR(192,192,192,55) DRAWRECTANGLE(B5INDEX,P0price,B5INDEX,P1price)coloured(192,192,192,55)FILLCOLOR(192,192,192,55) if trendhaussier then DRAWPOINT(b0index,high[b0]+0.01*high[b0],2)coloured(0,200,0) endif endif return |
Share this
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.
ProRealTime ITF files and other attachments :
Filename : download the ITF files
How to import ITF files into ProRealTime platform?
PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials