//
//============================== Trend haussier
//Configuration haussière
if (close > open) then
UP = 1
else
UP = 0
endif
//Valeurs des configuration haussière
if (UP = 1) then
VHCORP = 0 + (close - open)
VHMECH = VHCORP + (open - low)
VHBMECH = 0 - (high - close)
elsif (UP = 0) then
VHCORP = 0
VHMECH = 0
VHBMECH = 0
endif
//============================== Trend baissier
//Configuration baissière
if (close < open) then
DW = 1
else
DW = 0
endif
//Valeurs des configuration baissière
if (DW = 1) then
VBCORP = 0 - (open - close)
VBMECH = VBCORP - (high - open)
VBHMECH = 0 + (close - low)
elsif (DW = 0) then
VBCORP = 0
VBMECH = 0
VBHMECH = 0
endif
//============================== Trend neutre
//Configuration neutre
if (close = open) then
NT = 1
else
NT = 0
endif
//Valeurs des configuration neutre
if (NT = 1) then
VNHMECH = 0 + (open - low)
VNBMECH = 0 - (high - open)
elsif (NT = 0) then
VNHMECH = 0
VNBMECH = 0
endif
//============================== Fin
return VHCORP coloured (36,147,219) style (histogram,1) as "HCorp" , VHMECH coloured (36,147,219,50) style (histogram,1) as "HMeche" , VHBMECH coloured (101,101,101,50) style (histogram,1) as "HBMeche" , VBCORP coloured (101,101,101) style (histogram,1) as "BCorp" , VBMECH coloured (101,101,101,50) style (histogram,1) as "BMeche" , VBHMECH coloured (36,147,219,50) style (histogram,1) as "BHMeche" , VNHMECH coloured (36,147,219,50) style (histogram,1) as "HMeche Doji" , VNBMECH coloured (101,101,101,50) style (histogram,1) as "BMeche Doji"