Bonjour à tous,
Je souhaiterais réaliser un indicateur qui compte les bougie positives négatives neutres, depuis chaque ouverture journalière.
L’indicateur serait positionner sur TF 5mn et relèverait sous forme de points l’intention sur chaque bougies.
J’ai pu réaliser une première ébauche de celui-ci, mais malheureusement le rendu n’est pas bon.
Pas de remise à zéro
Bougies neutre ne remontent pas bien etc ..
Auriez-vous des pistes à m’exposer ?
Merci par avance
If Close < Open and abs(Close-Open)>Variable Then
BOUGIEMOINS=1
Else
BOUGIEMOINS=0
Endif
If Close > Open and abs(Close-Open)>Variable Then
BOUGIEPLUS=1
Else
BOUGIEPLUS=0
Endif
If -(Variable)>(Close-Open) and (Close-Open)<(Variable) Then
BOUGIENEUTRE=1
Else
BOUGIENEUTRE=0
Endif
If Today <> Yesterday Then
Points=0
Endif
if BOUGIEMOINS=1 Then
Points = Points[1] - 1
Elsif BOUGIEPLUS=1 Then
Points = Points[1] + 1
Elsif BOUGIENEUTRE=1 Then
Points = Points [1]
Endif
Return Points
Bonsoir,
lignes 1 à 17 ci-dessus peuvent se simplifier en lignes 1 à 3 ci-dessous (incluant résolution de bougieneutre), le bloc if 19-21 du “points=0” devait être intégré à celui avec les elsif de 23 à 29 pour ne pas se faire repasser dessus, et ligne 19 est mieux gérée par comparaison des intradaybarindex:
BOUGIEMOINS= Close < Open and abs(Close-Open)>Variable
BOUGIEPLUS= Close > Open and abs(Close-Open)>Variable
BOUGIENEUTRE= abs(close-open)<variable
if intradaybarindex<intradaybarindex[1] then
Points=0
elsif BOUGIEMOINS=1 Then
Points = Points[1] - 1
elsif BOUGIEPLUS=1 Then
Points = Points[1] + 1
elsif BOUGIENEUTRE=1 Then
Points = Points [1]
endif
return Points