katsParticipant
Junior
@JC_Bywan
bonsoir
le code ne fonctionne pas
il n est tenu compte que des indicateurs du 15 mn avec ce code
cdlt
kats
SLIPPAGE=10
// Variable 1 MN
TIMEFRAME(15 minutes , default)
a15=rsi[14](typicalPrice)
b15=MACDline[12,26,9](close)
c15=exponentialaverage[9](MACDLine[12,26,9])
TIMEFRAME(5 minutes , default)
a5=rsi[14](typicalPrice)
b5=MACDline[12,26,9](close)
c5=exponentialaverage[9](MACDLine[12,26,9])
TIMEFRAME(1 minute , default)
a1=rsi[14](typicalPrice)
b1=MACDline[12,26,9](close)
c1=exponentialaverage[9](MACDLine[12,26,9])
if a15 > 50 and b15 > c15 and a5 > 50 and b5 > c5 and a1 > 50 and b1 > c1 then
r = 0
b2 = 0
g = 255
//Baisse
elsif a15 < 50 and b15 < c15 and a15 < 50 and b15 < c15 and a15 < 50 and b15 < c15 then
r = 255
b2 = 0
g = 0
//Neutre
else
r = 195
g = 195
b2 = 195
endif
DRAWCANDLE(open+slippage,high+slippage,low+slippage,close+slippage) coloured(r,g,b2)
RETURN
Bjr, merci de ne pas doubler les posts, cf règles de l’encart jaune en bas de page.
Pour quiconque tombe sur ce post dans une future recherche, cette conversation continue dans le topic initial:
multiframe pour colorier le fond ou bougies
Edit: des réponses sont intervenues ici avant de poursuivre dans l’original, la conversation continue désormais ici
et
Sujet déplacé de forum proorder à forum probuilder
Bonjour, vous avez utilisé “default” deux fois en 15 minutes et 1 minute.
Le graphique que vous utilisez est sûrement d’une minute, vous devez donc le mettre comme ceci :
SLIPPAGE=10
// Variable 1 MN
TIMEFRAME(15 minutes ,updateonclose )
a15=rsi[14](typicalPrice)
b15=MACDline[12,26,9](close)
c15=exponentialaverage[9](MACDLine[12,26,9])
TIMEFRAME(5 minutes , default)
a5=rsi[14](typicalPrice)
b5=MACDline[12,26,9](close)
c5=exponentialaverage[9](MACDLine[12,26,9])
TIMEFRAME(1 minute , default)
a1=rsi[14](typicalPrice)
b1=MACDline[12,26,9](close)
c1=exponentialaverage[9](MACDLine[12,26,9])
if a15 > 50 and b15 > c15 and a5 > 50 and b5 > c5 and a1 > 50 and b1 > c1 then
r = 0
b2 = 0
g = 255
//Baisse
elsif a15 < 50 and b15 < c15 and a15 < 50 and b15 < c15 and a15 < 50 and b15 < c15 then
r = 255
b2 = 0
g = 0
//Neutre
else
r = 195
g = 195
b2 = 195
endif
DRAWCANDLE(open+slippage,high+slippage,low+slippage,close+slippage) coloured(r,g,b2)
RETURN
Mauro T. “Algorithmic system”
Je suis désolé, mais je répondais et je n’avais pas vu ce que vous aviez écrit.
Salut
Mauro
est-ce l’erreur
elsif a15 < 50 and b15 < c15 and a15 < 50 and b15 < c15 and a15 < 50 and b15 < c15 then
répété 3 fois a15 < 50 and b15 < c15
devrait-ce être
elsif a15 < 50 and b15 < c15 and a5 < 50 and b5 < c5 and a1< 50 and b1 < c1 then
aussi sensibilité à la casse
SLIPPAGE ……slippage
Bien vu, merci.
Effectivement ça part d’un copier-coller de la ligne 22 en ligne 28, changements des > en < puis oubli de transformer les 15 en 5 et 1. Le code corrigé donne:
SLIPPAGE=10
// Variable 1 MN
TIMEFRAME(15 minutes , default)
a15=rsi[14](typicalPrice)
b15=MACDline[12,26,9](close)
c15=exponentialaverage[9](MACDLine[12,26,9])
TIMEFRAME(5 minutes , default)
a5=rsi[14](typicalPrice)
b5=MACDline[12,26,9](close)
c5=exponentialaverage[9](MACDLine[12,26,9])
TIMEFRAME(1 minute , default)
a1=rsi[14](typicalPrice)
b1=MACDline[12,26,9](close)
c1=exponentialaverage[9](MACDLine[12,26,9])
if a15 > 50 and b15 > c15 and a5 > 50 and b5 > c5 and a1 > 50 and b1 > c1 then
r = 0
blue = 0
g = 255
//Baisse
elsif a15 < 50 and b15 < c15 and a5 < 50 and b5 < c5 and a1 < 50 and b1 < c1 then
r = 255
blue = 0
g = 0
//Neutre
else
r = 195
g = 195
blue = 195
endif
DRAWCANDLE(open+slippage,high+slippage,low+slippage,close+slippage) coloured(r,g,blue)
//BACKGROUNDCOLOR(r,g,blue)
RETURN
Le choix des “default” ou “updateonclose” dépend de si l’utilisateur veut partir des valeurs clôturées de la période précédente ou de l’évolution dans la période en cours, a priori le topic précédent pointait vers vouloir du “default”.