NunoParticipant
Average
j’ai un screener qui ne renvoie pas de resultat alors que l’indicateur est ok
où est mon erreur?
merci pour votre aide
once monthlyHigh=undefined
once monthlyLow=undefined
dailyHigh= DHigh(1)
dailyLow= DLow(1)
// monthly high/low
If Month <> Month[1] then
monthlyHigh = Highest[BarIndex - lastMonthBarIndex](dailyHigh)
monthlyLow = Lowest[BarIndex - lastMonthBarIndex](dailyLow)
lastMonthBarIndex = BarIndex
ENDIF
C1 = close > monthlyLow and close < monthlyHigh
SCREENER[c1](close as "close")
Les variables sont elles correctement calculées ? On peut les visualiser en les indiquant une à une dans la colonne de tri:
SCREENER[c1](monthlyhigh)
(test pour voir monthlyhigh dans la colonne de tri)
NunoParticipant
Average
merci Nicolas
mais quand je fais SCREENER[c1](monthlyhigh AS “mh”), rien ne s’affiche comme ci la condition C1 était fausse
pourtant sur Euronext Actions, l’action UCB correspond à la condition
Bien sûr car dans ce cas il aurait fallu modifier c1 pour que le screener retourne des valeurs (en le forçant à 1 par exemple), puisque son problème c’est bien ça 🙂
Bref, le problème était notre soucis bien connu de période inférieure ou nulle rejetée par ProScreener (et sans message d’erreurs contrairement à ProBuilder) donc on tourne en rond si on ne sait pas 😐
once monthlyHigh=undefined
once monthlyLow=undefined
dailyHigh= DHigh(1)
dailyLow= DLow(1)
// monthly high/low
If Month <> Month[1] then
monthlyHigh = Highest[max(1,BarIndex - lastMonthBarIndex)](dailyHigh)
monthlyLow = Lowest[max(1,BarIndex - lastMonthBarIndex)](dailyLow)
lastMonthBarIndex = BarIndex
ENDIF
C1 = close > monthlyLow and close < monthlyHigh
SCREENER[c1](monthlyhigh AS "mh")
NunoParticipant
Average
un grand merci Nicolas pour votre aide, ça fonctionne!
je ne savais pas que Proscreener n’affichait pas de message d’erreur
dans le souci de m’améliorer, j’ai essayé de faire ce que vous m’aviez préconisé avec c1=1 pour controler une variable, mais pas de resultat :(… juste pour savoir à l’avenir
once monthlyHigh=undefined
//once monthlyLow=undefined
dailyHigh= DHigh(1)
//dailyLow= DLow(1)
// monthly high/low
if Month <> Month[1] then
monthlyHigh = Highest[BarIndex - lastMonthBarIndex](dailyHigh)
//monthlyLow = Lowest[BarIndex - lastMonthBarIndex](dailyLow)
lastMonthBarIndex = BarIndex
ENDIF
//C1 = close > monthlyLow and close < monthlyHigh
C1 = 1
SCREENER[c1](monthlyhigh AS "mh")
Nuno
Oui car il faut modifier les lignes 8 et 9 pour le problème de période nulle.
NunoParticipant
Average
j ai bien compris Nicolas pour votre code et ce qui a été modifier: il fonctionne
je me suis mal exprimé
je voulais voir avec le code de mon message précedent, ce que vous aviez fait pour decouvrir l’erreur
C’est un problème récurrent de période nulle ou inférieure à 0. En général quand ProScreener détecte une erreur, il s’arrête subitement et ne retourne aucun résultat.
NunoParticipant
Average
merci pur les explications
je viens de modifier un nouveau code pour proscreener afin de determnier les actions dont la cloture est au dessus de la boll sup mensuelle et avec les bandes de bollinger mensuelles qui divergent
j’y ai apporté les modifications du screener precedent pour eviter les erreurs periode nulle mais le screener n’affiche rien
monthlyHigh = Highest[max(1,BarIndex – lastMonthBarIndex)](dailyHigh)
monthlyLow = Lowest[max(1,BarIndex – lastMonthBarIndex)](dailyLow)
en mettant la condition C1 = 1 pour forcer et controler les variables, il me dit que plusieurs variables ne sont pas utilisées???? comment controler alors?
TIMEFRAME(daily)
once haut = high
once bas = low
haut = max(haut,high)
bas = min(bas,low)
once monthlyHigh = undefined
once monthlyLow = undefined
once monthlyClose = undefined
dailyHigh = DHigh(1)
dailyLow = DLow(1)
if openMonth <> openMonth[1] then
monthlyHigh = Highest[max(1,BarIndex - lastMonthBarIndex)](dailyHigh)
monthlyLow = Lowest[max(1,BarIndex - lastMonthBarIndex)](dailyLow)
monthlyClose = DClose(1)
lastMonthBarIndex = BarIndex
//h20 = h19
h19 = h18
h18 = h17
h17 = h16
h16 = h15
h15 = h14
h14 = h13
h13 = h12
h12 = h11
h11 = h10
h10 = h9
h9 = h8
h8 = h7
h7 = h6
h6 = h5
h5 = h4
h4 = h3
h3 = h2
h2 = h1
h1 = monthlyHigh
haut = high
//l20 = l19
l19=l18
l18=l17
l17=l16
l16=l15
l15=l14
l14=l13
l13=l12
l12=l11
l11=l10
l10=l9
l9=l8
l8=l7
l7=l6
l6=l5
l5=l4
l4=l3
l3=l2
l2=l1
l1= monthlyLow
bas = low
//a20=a19
a19=a18
a18=a17
a17=a16
a16=a15
a15=a14
a14=a13
a13=a12
a12=a11
a11=a10
a10=a9
a9=a8
a8=a7
a7=a6
a6=a5
a5=a4
a4=a3
a3=a2
a2=a1
a1 = monthlyClose
zz=zz+1
endif
tp1=(h1+l1+a1)/3
tp2=(h2+l2+a2)/3
tp3=(h3+l3+a3)/3
tp4=(h4+l4+a4)/3
tp5=(h5+l5+a5)/3
tp6=(h6+l6+a6)/3
tp7=(h7+l7+a7)/3
tp8=(h8+l8+a8)/3
tp9=(h9+l9+a9)/3
tp10=(h10+l10+a10)/3
tp11=(h11+l11+a11)/3
tp12=(h12+l12+a12)/3
tp13=(h13+l13+a13)/3
tp14=(h14+l14+a14)/3
tp15=(h15+l15+a15)/3
tp16=(h16+l16+a16)/3
tp17=(h17+l17+a17)/3
tp18=(h18+l18+a18)/3
tp19=(h19+l19+a19)/3
//tp20=(h20+l20+a20)/3
mblast = ((close+bas+haut)/3+tp1+tp2+tp3+tp4+tp5+tp6+tp7+tp8+tp9+tp10+tp11+tp12+tp13+tp14+tp15+tp16+tp17+tp18+tp19)/20
volalast = ((square((close+bas+haut)/3)+square(tp1)+square(tp2)+square(tp3)+square(tp4)+square(tp5)+square(tp6)+square(tp7)+ square(tp8)+square(tp9)+square(tp10)+square(tp11)+square(tp12)+square(tp13)+square(tp14)+square(tp15)+square(tp16)+square(tp17)+square(tp18)+square(tp19))/20)-square(mblast)
ecartlast = sqrt(volalast)
ublast = mblast +(2*ecartlast)
lblast = mblast -(2*ecartlast)
if zz < 20 then
mblast=undefined
ublast=undefined
lblast=undefined
endif
//
c1 = close > ublast and ublast > ublast[1] AND lblast < lblast[1]
//c1= 1
SCREENER[c1](mblast as "mb")
En effet, le langage de programmation n’autorise pas les variables non utilisées .. 😯 le mieux étant de les commenter dans ce genre de cas 😐
NunoParticipant
Average
même en commentant les variables non utilisées, je n’ai aucune valeur dans Proscreener
je voulais suivre la variable mb
ci dessous le code
TIMEFRAME(daily)
once haut = high
once bas = low
haut = max(haut,high)
bas = min(bas,low)
once monthlyHigh = undefined
once monthlyLow = undefined
once monthlyClose = undefined
dailyHigh = DHigh(1)
dailyLow = DLow(1)
if openMonth <> openMonth[1] then
monthlyHigh = Highest[max(1,BarIndex - lastMonthBarIndex)](dailyHigh)
monthlyLow = Lowest[max(1,BarIndex - lastMonthBarIndex)](dailyLow)
monthlyClose = DClose(1)
lastMonthBarIndex = BarIndex
//h20 = h19
h19 = h18
h18 = h17
h17 = h16
h16 = h15
h15 = h14
h14 = h13
h13 = h12
h12 = h11
h11 = h10
h10 = h9
h9 = h8
h8 = h7
h7 = h6
h6 = h5
h5 = h4
h4 = h3
h3 = h2
h2 = h1
h1 = monthlyHigh
haut = high
//l20 = l19
l19=l18
l18=l17
l17=l16
l16=l15
l15=l14
l14=l13
l13=l12
l12=l11
l11=l10
l10=l9
l9=l8
l8=l7
l7=l6
l6=l5
l5=l4
l4=l3
l3=l2
l2=l1
l1= monthlyLow
bas = low
//a20=a19
a19=a18
a18=a17
a17=a16
a16=a15
a15=a14
a14=a13
a13=a12
a12=a11
a11=a10
a10=a9
a9=a8
a8=a7
a7=a6
a6=a5
a5=a4
a4=a3
a3=a2
a2=a1
a1 = monthlyClose
zz=zz+1
endif
tp1=(h1+l1+a1)/3
tp2=(h2+l2+a2)/3
tp3=(h3+l3+a3)/3
tp4=(h4+l4+a4)/3
tp5=(h5+l5+a5)/3
tp6=(h6+l6+a6)/3
tp7=(h7+l7+a7)/3
tp8=(h8+l8+a8)/3
tp9=(h9+l9+a9)/3
tp10=(h10+l10+a10)/3
tp11=(h11+l11+a11)/3
tp12=(h12+l12+a12)/3
tp13=(h13+l13+a13)/3
tp14=(h14+l14+a14)/3
tp15=(h15+l15+a15)/3
tp16=(h16+l16+a16)/3
tp17=(h17+l17+a17)/3
tp18=(h18+l18+a18)/3
tp19=(h19+l19+a19)/3
//tp20=(h20+l20+a20)/3
mblast = ((close+bas+haut)/3+tp1+tp2+tp3+tp4+tp5+tp6+tp7+tp8+tp9+tp10+tp11+tp12+tp13+tp14+tp15+tp16+tp17+tp18+tp19)/20
//volalast = ((square((close+bas+haut)/3)+square(tp1)+square(tp2)+square(tp3)+square(tp4)+square(tp5)+square(tp6)+square(tp7)+ square(tp8)+square(tp9)+square(tp10)+square(tp11)+square(tp12)+square(tp13)+square(tp14)+square(tp15)+square(tp16)+square(tp17)+square(tp18)+square(tp19))/20)-square(mblast)
//ecartlast = sqrt(volalast)
//ublast = mblast +(2*ecartlast)
//lblast = mblast -(2*ecartlast)
//
if zz < 20 then
mblast=undefined
//ublast=undefined
//lblast=undefined
endif
//
//c1 = close > ublast and ublast > ublast[1] AND lblast < lblast[1]
c1= 1
SCREENER[c1](mblast as "mb")
NunoParticipant
Average
Nicolas,
si à l’occasion, tu peux répondre à mon message précédent, ce serait super sympa 😉
est du à une limitation de proscreener: nbv de barres….?
merci
Nuno
L’instruction OpenMonth n’est pas connu par ProScreener, il faut utiliser Month à la place.
NunoParticipant
Average
un grand merci Nicolas pour votre aide
j’ai fait les changements et c’est ok 🙂
ce serait super d’avoir un affichage des erreurs avec Proscreener