Bonjour,
J’essai de programmer un screener qui me sorte la bougie qui passe au dessus du nuage ichimoku.
La première qui franchi soit la SSA ou la SSB.
Je galère, voici mon code :
// DEFINITION ICHIMOKU
tenkanS = (highest[9](high)+lowest[9](low))/2
kijunS= (highest[26](high)+lowest[26](low))/2
SSpanA = (tenkanS[26]+kijunS[26])/2
SSpanB = (highest[52](high[26])+lowest[52](low[26]))/2
a1 = SSpanB < close
c1a = SSpanA > SSpanB
c2a = open[1] > SSpanA AND close[1] > SSpanA
c1b = SSpanB > SSpanA
c2b = open[1] > SSpanB AND close[1] > SSpanB
c1c = kijunS < tenkanS // kinjun supérieur à la tenkan
c1d = (kijunS[1] CROSSES OVER tenkanS[1])
COND1 = (c1a and c2a) OR (c1b and c2b) OR (c1c and c1d and a1)
c3a = open > SSpanA and close > SSpanA and low < SSpanA
c3b = open > SSpanB and close > SSpanB and low < SSpanB
COND2 = (c1a and c3a) OR (c1b and c3b)
screener[COND1 and COND2]
L’idéal est que le screener fonctionne en journalier, avec une configuration tenkan au dessus de la kinjun, pour filtrer les réponses, ou inversement.
Vue que je débute, c’est un peu la misère pour moi.
Merci par avance, pour vos retours.
Je rajoute un graphique, c’est plus parant. C’est le genre de configuration que je veux détecter. Si il y a une mèche dans le nuage, ce n’est pas grave.
Je ne compte plus le nombre de fois où j’ai codé ce type de détection 🙂 mais c’est toujours plus rapide de le recoder que d’en chercher un exemplaire sur le forum, voici :
// DEFINITION ICHIMOKU
tenkanS = (highest[9](high)+lowest[9](low))/2
kijunS= (highest[26](high)+lowest[26](low))/2
SSpanA = (tenkanS[26]+kijunS[26])/2
SSpanB = (highest[52](high[26])+lowest[52](low[26]))/2
c1 = tenkanS>kijunS
c2 = close crosses over max(sspana,sspanb)
screener[C1 and C2]
Ce lien qui regroupe pas mal de sujets sur ichimoku pourrait t’aider à l’avenir : https://www.prorealcode.com/topics-tag/ichimoku/
Merci beaucoup pour la réponse, j’ai du mal chercher.
Je ferai plus attention la prochaine fois. Merci encore et bon week-end.