Hola,
Busco un screener con la siguiente característica:
- Qué el precio actual esté cerca, entre un 1% y un 15% por debajo del punto máximo alcanzado entre las 12 semanas y 252 semanas anteriores a la vela actual. Es decir, si el punto máximo se consiguió hace un mes, y ha hecho una corrección y esta por ejemplo a un 7% de ese máximo, no me serviría.
Gracias
Y una condición más que no se si se puede poner:
Si entre el precio actual y la semana 12 anterior se ha producido un máximo superior al máximo de la semana 12 a la 252 que no aparezca en el screener
Gracias
Buenas. Aquí lo tienes:
//Check max between 252 and 12
maxHigh=0
for i=252 downto 12 do
if high[i]>maxHigh then
maxHigh=high[i]
// barmax=barindex[i]
endif
next
//Limits
limitup=maxHigh*0.99
limitdn=maxHigh*0.85
//Check
check=0
for i=0 to 12 do
if high[i]>maxHigh then
check=1
break
endif
next
screener[high<limitup and high>limitdn and check=0]
Este indicador te puede servir como referencia para chequear:
maxHigh12 = highest[12](High)
maxHigh252 = highest[252](high)
if islastbarupdate then
maxHigh=0
for i=252 downto 12 do
if high[i]>maxHigh then
maxHigh=high[i]
barmax=barindex[i]
endif
next
drawsegment(barmax,maxHigh*0.99,barindex+10,maxhigh*0.99)style(dottedline)
drawsegment(barmax,maxHigh*0.85,barindex+10,maxhigh*0.85)style(dottedline)
drawpoint(barmax,maxHigh,3)coloured("fuchsia")
drawvline(barindex[252])
drawvline(barindex[12])
endif
return maxHigh12 coloured("blue"), maxHigh252 coloured("red")