Forums › ProRealTime forum Français › Support ProScreener › Screener Détection Figure Tasse et Anse › Reply To: Screener Détection Figure Tasse et Anse
08/07/2018 at 4:24 PM
#77732
Merci Nicolas pour ces encouragements ; -)
pour le 1/
=> j’ai rajouté une boucle et un test pour éviter de se retrouver avec des bas plus bas que BC dans la partie de la figure entre BC (Bottom Cup) et LC ( Left Cup)
Pour le 2/
=> il faudrait faire la même chose mais le cas est très peu présent sur les screeners donc pour l’instant je laisse en l’état
Pour le 3/
=> comment ferais-tu pour inclure une condition qui vérifie que les volumes augmentent entre BC et LH (Left Handle) et qu’ils diminuent entre LH et BC ? (c’est la partie grisée dans le code qui donne alpha et beta)
Cheers,
Chris
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
BCTest = low[indexBC] For mm =IndexBC to IndexLC do if low[mm+1]> BC then BCTest = BCTest elsif low[mm+1]< BC then BCTest = low[mm+1] //IndexBCTest = mm+1 endif Next ....... screener [NLH > 2 AND Close>BH AND BC<LC and <strong>BCTest>= BC</strong> AND BC<LH AND BH<LH AND LC>0.97*LH AND LC < 1.03*LH AND delta>1 AND BH>0.8*LH AND BH>BC AND MinPrice AND MinVolume AND AmplitudeMax](IndexLH as "rang")// and beta> 1 AND alpha > 1 |
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 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 |
Timeframe (daily) MinPrice= close > 2.5 and close < 50 MinVolume= average[23](Volume) > 100000 // LEFT HANDLE/////////////////////// LH = highest[24](high) For i = 0 to 24 do if high[i] = LH then indexLH = i break endif Next //BOTTOM HANDLE/////////////////////// BH = lowest[1+indexLH](low) For j = 0 to indexLH do if low[j] = BH then IndexBH = j break endif Next NLH=IndexLH-IndexBH // BOTTOM CUP///////////////////////// BC = low[indexLH] For k = indexLH to IndexLH+25 do if low[k+1] > BC then indexBC = indexBC elsif low[k+1] < BC then BC = low[k+1] IndexBC = k+1 endif Next // LEFT CUP LC = high[indexBC] For m =IndexBC to IndexBC+145 do if high[m+1]< LC then LC = LC elsif high[m+1]> LC then LC = high[m+1] IndexLC = m+1 endif Next BCTest = low[indexBC] For mm =IndexBC to IndexLC do if low[mm+1]> BC then BCTest = BCTest elsif low[mm+1]< BC then BCTest = low[mm+1] //IndexBCTest = mm+1 endif Next // LEFT OF THE CUP KC = low[indexLC] For n= IndexLC to IndexLC + 50 do if low[n+1]> KC then KC = KC elsif low[n+1] < KC then KC = low[n+1] endif Next Delta= LC/KC AmplitudeMax = Max(LC,LH)/BC<1.3 //DRPV1=0 //URPV1=0 // // //For o=IndexBC downto IndexLH do // //If Close[o+1] < Close[o] then //URPV1 = Volume[o]*(Close[o]- Close[o+1])+URPV1 //else //UPRV1=UPRV1 //endif // //If Close[o] < Close[o+1] then //DRPV1 = Volume[o]*(Close[o+1]-Close[o])+DRPV1 // //else //DRPV1 = DRPV1 //endif // //Next // //Alpha = URPV1/DRPV1 // Should be >1 //// //// Calculate Beta //DRPV2=0 //URPV2=0 // //// //For p=IndexLH downto IndexBH do //If Close[p+1] > Close[p] then //URPV2 = Volume[p]*(Close[p+1]-Close[p])+URPV2 // //else //URPV2=URPV2 //endif // //If Close[p+1]< Close[p] then //DRPV2 = Volume[p+1]*(Close[p+1]-Close[p])+DRPV2 // //else //DRPV2=DRPV2 //endif //Next // //Beta = DRPV2/URPV2 //Gamma = log(Alpha) + log(Beta) + delta screener [NLH > 2 AND Close>BH AND BC<LC and BCTest>= BC AND BC<LH AND BH<LH AND LC>0.97*LH AND LC < 1.03*LH AND delta>1 AND BH>0.8*LH AND BH>BC AND MinPrice AND MinVolume AND AmplitudeMax](IndexLH as "rang")// and beta> 1 AND alpha > 1 |