Bonjour, souvent j’ai un problème de latence car le temps que ça calcul que le prix baissé ou monte de x points ou ticks pour afficher la brique.
Une des solutions que j’ai trouver est par exemple je choisis le nombre de points et lorsque le prix descend de ce nombre de points une droite est dessiné rouge quand c baissier vert quand c haussier. Est il possible de le faire sans l’inversion ?
Cordialement.
Holà. voici un exemple de comment contrôler les niveaux en fonction de la quantité de mouvement.
pt=50
diff=pt*pipvalue
once nextHighlevel=high
once nextLowlevel=low
if high>nextHighlevel then
drawsegment(prevx,high,barindex,high)coloured("green")
nextHighlevel=high+diff
nextLowlevel=high-diff
//drawsegment(barindex+5,nextLowlevel,barindex,nextLowlevel)coloured("red")style(dottedline)
//drawsegment(barindex+5,nextHighlevel,barindex,nextHighlevel)coloured("green")style(dottedline)
prevx=barindex
endif
if low<nextLowlevel then
drawsegment(prevx,low,barindex,low)coloured("red")
nextLowlevel=low-diff
nextHighlevel=low+diff
//drawsegment(barindex+5,nextLowlevel,barindex,nextLowlevel)coloured("red")style(dottedline)
//drawsegment(barindex+5,nextHighlevel,barindex,nextHighlevel)coloured("green")style(dottedline)
prevx=barindex
endif
if islastbarupdate then
drawsegment(prevx,nextLowlevel,barindex,nextLowlevel)coloured("red")style(dottedline)
drawsegment(prevx,nextHighlevel,barindex,nextHighlevel)coloured("green")style(dottedline)
endif
return