Overblog
Editer l'article Suivre ce blog Administration + Créer mon blog
18 février 2009 3 18 /02 /février /2009 17:33


Obv est un indicateur de volume - j'ai trouvé sur internet une variante :
 le obv multivote,en plus de la clôture ,il prend en compte le +haut et le +bas du jour.

j'ai rajouté une moyenne pondérée comme signal.


ci-dessous le code :


//MULTI-VOTE OBV
// Appeared in June 93 issue of Stocks & Commodities magazine.

////OBV MULTI-VOTE////


if high >high[1] then
 c1=1
else
 c1=-1
endif

if high = high[1] then
 c1=0
endif


if close > close[1]  then
 c2 = 1
else
 c2=-1
 
endif

if close = close[1] then
 c2=0
endif


if low > low[1] then
 
 c3 = 1
else
 c3=-1
 
endif

if low = low[1] then
 c3=0
endif

 


b1=cumsum(((c1+c2+c3)/3)*volume)

////////////trigger moyennemobile

//variable moyenne = p par défaut = 5

b2= weightedaverage[p](b1)

 

return b1 AS " OBV MULTIVOTE" ,b2 as "signal"

///////////////////////////////////////////////////////////






 

 


Partager cet article
Repost0
- dans Volume