Ci - dessous le code Prorealtime histogramme (mettre sous le graphe) du TTM TREND de John Carter.
Lien ,avec une video explicative du TTM-TREND (en anglais) http://www.tradethemarkets.com/products/item9.cfm
////////////TTMTEND JOHNCARTER
//VARIABLE = CB- par DEFAUT CB=6
//customclose par defaut = totalprice
if barindex>1 then
hclose= customclose
hopen= (hopen[1] + hclose[1])/2
else
hopen=open
hclose= customclose
endif
if hclose > hopen then
color =1
else
color =-1
endif
for i =1 to cb
if hopen <= max(hopen[i],hclose[i]) and hopen >= min(hopen[i],hclose[i]) and hclose <= max(hopen[i],hclose[i]) and hclose >= min(hopen[i],hclose[i])then // mettre sur une seule ligne
color=color[i]
endif
next
return color as " TTM TREND" // mettre histogramme
Ci - dessous le code Prorealtime chart (mettre sur le graphe) du TTM TREND .
/////////////TTMTEND JOHNCARTER
//VARIABLE = CB - par DEFAUT CB=6
// customclose - par défaut totalprice (c+o+l+h)/4
// ce programme s'ouvre sur le graphe prix en position barchart.
//vous devez remplacer les lignes par des points (en position 3)
//et choisir suivant votre choix couleur hausse et baisse
////////////////////////////////
if barindex>1 then
hclose= customclose
hopen= (hopen[1] + hclose[1])/2
else
hopen=open
hclose=customclose
endif
if hclose > hopen then
c =1
else
c =-1
endif
for i =1 to cb
if hopen <= max(hopen[i],hclose[i]) and hopen >= min(hopen[i],hclose[i]) and hclose <= max(hopen[i],hclose[i]) and hclose >= min(hopen[i],hclose[i])then // mettre sur une seule ligne
c=c[i]
endif
next
/////////////////coloriage du barchart
r=(high-low)/29
b1=low
b2=b1+r
b3=b2+r
b4=b3+r
b5=b4+r
b6=b5+r
b7=b6+r
b8=b7+r
b9=b8+r
b10=b9+r
b11=b10+r
b12=b11+r
b13=b12+r
b14=b13+r
b15=b14+r
b16=b15+r
b17=b16+r
b18=b17+r
b19=b18+r
b20=b19+r
b21=b20+r
b22=b21+r
b23=b22+r
b24=b23+r
b25=b24+r
b26=b25+r
b27=b26+r
b28=b27+r
b29=b28+r
b30=b29+r
return b1 coloured by c,b2 coloured by c,b3 coloured by c,b4 coloured by c,b5 coloured by c,b6 coloured by c,b7 coloured by c,b8 coloured by c,b9 coloured by c,b10 coloured by c,b11 coloured by c,b12 coloured by c,b13 coloured by c,b14 coloured by c,b15 coloured by c,b16 coloured by c,b17 coloured by c,b18 coloured by c,b19 coloured by c,b20 coloured by c,b21 coloured by c,b22 coloured by c,b23 coloured by c,b24 coloured by c,b25 coloured by c,b26 coloured by c,b27 coloured by c,b28 coloured by c,b29 coloured by c,b30 coloured by c