ProRealTime
Pour discuter sur l’interface de ProRealTime Software, nos configurations graphiques...
Répondre • Page 1 sur 1

Code Darvas mofications

par Raiko » 28 févr. 2015 21:41

Bonsoir,

J'aimerais rendre moins sensible la définission d'un + haut ou + bas donc au lieu de 3 barres en dessous d'un plus haut passer à 4 voir plus et pareil pour un plus bas. Instinctivement, j'ai augmenter toutes les données liées au nombre 3 (en gras dans le code ci-dessous et le code modifié plus bas) puisque c'est la base du code (Je m'exprime rapidement en espérant que ceux qui connaissent Darvas comprendront sinon je détaillerais). Ca à l'air de fonctionner pour la premiere incrémentation mais au delà, certaines boites deviennent plus petites et l'allure ne me convient pas.
Je suis preneur de toutes remarques pour améliorer ce code et de code darvas différents de celui-ci.
:merci:

J'ai un code pour Darvas pris sur hk-lisse:
k=48
once tth=undefined
once ttl=undefined
n=(k*2)-4
p=(n/2)-1
h1=dpo[n](high)
moyh=high-h1
hi=(moyh-moyh[1]+(high[p])/n)*n
hi=(round(hi*100))/100
l1=dpo[n](low)
moyl=low-l1
lo=(moyl-moyl[1]+(low[p])/n)*n
lo=(round(lo*100))/100
low1=(round(low*100))/100
high1=(round(high*100))/100
if barindex > 100 then
if box=1 and (high1>tth or low1<ttl) then
box=0
flag=0
endif
if box=0 and flag=0 and high1>=hi[46] and high1>=hi[45] and high1>=hi[44] then
th=high1
flag=1
endif
if box=0 and flag=1 then
for zz=0 to 44
if hi[47-zz-1]>th or hi[47-zz-2]>th or hi[47-zz-3]>th then
flag=0
break
endif
if lo[47-zz]<lo[47-zz-1] and lo[47-zz]<lo[47-zz-2] and lo[47-zz]<lo[47-zz-3] then
box=1
tth=th
ttl=lo[47-zz]
break
endif
next
endif
else
tth=undefined
ttl=undefined
endif
if box=1 then
ba=ttl
else
ba=tth
endif
return ba coloured by box-1, tth coloured by box-1, ttl coloured by box-1


Voici le nouveau code qui fonctionne pour une incrementation ou réduction de la sensibilité de 1:

Code : #

k=49
once tth=undefined
once ttl=undefined
n=(k*2)-4
p=(n/2)-1
h1=dpo[n](high)
moyh=high-h1
hi=(moyh-moyh[1]+(high[p])/n)*n
hi=(round(hi*100))/100
l1=dpo[n](low)
moyl=low-l1
lo=(moyl-moyl[1]+(low[p])/n)*n
lo=(round(lo*100))/100
low1=(round(low*100))/100
high1=(round(high*100))/100
if barindex > 100 then
if box=1 and (high1>tth or low1<ttl) then
box=0
flag=0
endif
if box=0 and flag=0 and high1>=hi[47] and high1>=hi[46] and high1>=hi[45]  and high1>=hi[44] then
th=high1
flag=1
endif
if box=0 and flag=1 then
for zz=0 to 45
if  hi[48-zz-1]>th or hi[48-zz-2]>th or hi[48-zz-3]>th  or hi[48-zz-4]>th then
flag=0
break
endif
if lo[48-zz]<lo[48-zz-1] and lo[48-zz]<lo[48-zz-2] and lo[48-zz]<lo[48-zz-3]  and lo[48-zz]<lo[48-zz-4]then
box=1
tth=th
ttl=lo[48-zz]
break
endif
next
endif
else
tth=undefined
ttl=undefined
endif
if box=1 then
ba=ttl
else
ba=tth
endif
return ba coloured by box-1, tth coloured by box-1, ttl coloured by box-1
DAX30 Perf Index.png
DAX30 Perf Index.png (30.53 Kio) Vu 2332 fois

Re: Code Darvas mofications

par koub » 01 mars 2015 12:18

Plop Raiko, je ne connais pas Darvas, mais d'après ce que je crois voir, ce code repeint l'intégralité du passé en fonction des données du présent... Si tu veux une détection de plus haut / plus bas "potable", jettes un œil à l'indicateur ZigZag posté ici: http://www.andlil.com/forum/probuilder-prt-t6808.html

Ce n'est pas du code PRT mais tu peux t'en inspirer car sur de petites périodes, son fonctionnement est plus que correct et du coup, il ne repeint quasiment pas...

+, koub. :)

Re: Code Darvas mofications

par Raiko » 01 mars 2015 15:55

Bonjour Koub et à la communauté andlil,

J'ai jeté un oeuil au code MT4 Zigzag, je vais voir ce que je peux en tirer parceque j'ai des difficultés à le comprendre.
Ca m'a inspiré pour mettre un zigzag sur les cours avec les boites de darvas, le rendu est pertinent.
Je continu de tatonner pour une personnalisation des boites. Ma prochaine modif sera de coupler les boites bear et Bull dans un meme code. Pour l'instant, j'ai les deux sur la fenetre et je regarde l'un ou l'autre en fonction de la tendance.

Bonne journée!

Re: Code Darvas mofications

par Anonymous99 » 19 mai 2016 21:08

Pour information, sur prorealcode.com on retrouve les 2 indicateurs :

http://www.prorealcode.com/prorealtime-indicators/darvas-boxes/
http://www.prorealcode.com/prorealtime-indicators/zigzag-trend/

Sujets similaires
Screener Darvas
par Raiko » 04 mars 2015 21:54 (1 Réponses)
Darvas Diaries
par kero » 14 avr. 2017 21:59 (16 Réponses)
Indicateurs boites de Darvas pour PRT 10.3
Fichier(s) joint(s) par julien333 » 13 oct. 2017 22:18 (4 Réponses)
Code couleur qui change à chaque MàJ d'un sujet
Fichier(s) joint(s) par Saimonnn » 19 oct. 2012 21:23 (4 Réponses)
code PRT > RSBoll/Seuil backtest
par newworld » 16 juin 2013 17:57 (4 Réponses)
Le dress code de Wall Street
par ladefense92800 » 05 sept. 2013 17:04 (13 Réponses)
Code PRT point-pivot (clôture veille)
par fredi » 12 oct. 2013 14:20 (5 Réponses)
Besoin d'aide code PRT.
par Ice. » 31 oct. 2013 16:14 (33 Réponses)
CODE PRT points pivots mensuels
par GDX23 » 04 janv. 2014 12:07 (3 Réponses)
code couleur
Fichier(s) joint(s) par DarthTrader » 06 juin 2014 10:31 (9 Réponses)