This code could be used in junction my other one, but his code searches for a WOLF WAVE pattern, but now in the actual buy zone, therefore point 5 is in a ascent movement.
The accuracy of the wolf wave can be configurable at the beginning of the code.
The screener generates a list with the values that are matching with the parameters.
It is returned as “Point_1” the value of the first point of Wolf wave, so you need to go to chart and search for this value, in the screenshot was returned the value of 7,71.
Parameters manages by code:
-That point 1 and 3 are not differing more than a percentage value.
-That point 2 and 4 are not differing more than a percentage value.
-That the distance between point 1-3 and point 2-4 are not different more than a number of candles, to avoid a far point 4, for example.
-That ramps 1-2 and 3-4 are not differing more than a percentage, to assure that ramps are within a range of angle.
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 |
//-----------------------------Configure screener TIMEFRAME(daily) //--------analysis for value conditions-------- // // Maximum % allowed between peaks 1-3 and also for valley 2-4 // Example: point 3 must not differ from point 1 more than this value maxVgap=2 //---- Distance in candles between candles 1-3 // and 3-4 must not differ in a number // greater than maxcandle // to assure equitative ramps MaxCandle=4 //-- Analysis for timing conditions en percentage // in %, maximum diference between ramps // Distance between points 1-2 and 3-4 must not exceed this value // to assusre equitative ramps MaxTiempoGap=30 //-- Maximum candles searched back Lookback=100 //------------------------------ Code zz = ZigZag[4](close) p = zz<zz[1] and zz[1]>zz[2] v = zz>zz[1] and zz[1]<zz[2] if p then top = zz[1] endif if v then bottom = zz[1] endif //------ Point 5 detection for i =1 to lookback do if v[i] then Vpunto5= bottom[i] punto5=1 vela5=i break ENDIf next //--------Point 4 detection if punto5=1 then//-- Only in first point of waves is already detected for i =vela5+1to lookback do //--start to search from previous point if p[i] then Vpunto4= top[i] punto4=1 vela4=i break ENDIf next endif //------Point 3 detection if punto4=1 then for i =vela4+1 to lookback do//--start to search from previous point if v[i] then Vpunto3= bottom[i] punto3=1 vela3=i break ENDIf next endif //-----------Point 2 detection if punto3=1 then for i =vela3+1to lookback do//--start to search from previous point if p[i] then Vpunto2= top[i] punto2=1 vela2=i break ENDIf next endif //--------Point 1 detection if punto2=1 then for i =vela2+1 to lookback do//--start to search from previous point if v[i] then Vpunto1= bottom[i] punto1=1 vela1=i break ENDIf next endif //-----------Point recent peak detection if punto5=1 then for i =1 to lookback do//- if p[i] then //Vpunto2= top[i] Recentpeak=1 Peakpos=i break ENDIf next endif //---------------------------------Analysis //-- Value Point 3 compared with point 1 must not exceed the configured delta Gap13=abs((Vpunto3*100)/Vpunto1)-100 Gap13OK=Gap13 <maxVGap //-- Value Point 4 compared with point 2 must not exceed the configured delta Gap24=abs((Vpunto4*100)/Vpunto2)-100 Gap24OK=abs(Gap24) <maxVGap //--Distance between candles of point 1-2 and 3-4 must not differ more than the percentage set at begin,assuring equitative ramps Tiempo12=abs(Vela2-Vela1) Tiempo34=abs(Vela4-Vela3) TiemposGap=abs(((tiempo34*100)/Tiempo12)-100) CT=TiemposGap<MaxTiempoGap //--Distance between points 1-3 and 2-4, must be lower than 3 candles //--may be used also percentage Tiempo13=abs(Vela3-Vela1)//23 Tiempo24=abs(Vela2-Vela4)//4 CD=abs(Tiempo13-Tiempo24)<MaxCandle buyOK=(Recentpeak=1) and (Peakpos > vela5) //-- Last Zigzag was the valley of Point 5, not peak of zigzag after point 5 C1= (punto1=1) and (Vpunto1<>0) C2= (punto2=1) and (Vpunto2<>0) C3= (punto3=1) and (Vpunto3<>0) and (Vpunto3 > Vpunto1) and Gap13OK //--ramps are equitative C4= vela4<>0 and (punto4=1) and (Vpunto4<>0) and (Vpunto4 < Vpunto2) and Gap24OK C5= vela5<>0 and (punto5=1) and (Vpunto5<>0) and (Vpunto5 < Vpunto3) //-- Point 5 lowe than point 3 screener[C1 and C2 and C3 and C4 and C5 and CT and CD and buyOK ](Vpunto1 as "Point_1")//- First point of WOLF WAVE, search for this valley in chart |
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 :PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials
Buenas, he instalado el screener pero no me aparecen los números que indicas…tengo que montar algún indicador para que salgan?…gracias
Hola,
No, los numeros no aparecen, Proscreener no permite rotular,
Lo que devuelve el screener es el punto 1 de los puntos.
Para facilitar la localización puedes añadir el indicador ZigZag configurado a 4% y te ayudará a encontrar el punto 1, desde ahí simplemente es dibujar una linea que pase desde ese punto 1 y el punto 4.
Espero que haya sido de ayuda esta explicación, no dudes en consultar.
Saludos.
Hi Enriquem,
How do I change the timeframe from ‘Daily’ to “5 min”?
Thank you.