{
Ce code compte les bougie trimestrielles et permet d'obtenir la moyenne correspondant aux nombre de bougie du dernier trimestre écoulé ainsi aue les bandes de Bollinger correspondantes.
Nom : "S_MMA trimestrielle"
Variable 1 : "visibel", "visible", "booléen", "cocher=vrai"
Variable 2 : "bt", "Bollinger", "booléen", "cocher=vrai
}
///////////// LE CODE PRT /////////////////////////////////
if visible = 1 then
once ma = undefined
once bupt = undefined
once bdnt = undefined
once cptbar1 = 0
if month <> month[1] and barindex > 0 then
cptbar3 = cptbar2
cptbar2 = cptbar1
cptbar1 = cptbar
cptbar = 0
endif
cptbar = cptbar + 1
bar = max(cptbar+cptbar1+cptbar2, cptbar1+ cptbar2 + cptbar3)
if bar >3 then
ma = Average[round(bar)](close)
if bt then
bupT = Bollingerup[bar](close)
bdnT = Bollingerdown[bar](close)
endif
endif
else
ma = Undefined
bupt = Undefined
bdnt = Undefined
endif
return ma as "MMA trimestrielle", bupT as "Bollinger up Trimestrielle", bdnT as "Bollinger down trimestrielle"
