Initialiser le graphique Renko avec le DOpen chaque jour

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #96578 quote
    marc.v
    Participant
    New

    Bonjour à tous

    J espère que vous allez pouvoir m’aider  à modifier ce code Renko (sur prix)

    J ai ajouté un “prix médian” ((RenkoHigh+RenkoLow)/2 ) à l’indicateur fourni par Doctrading et dans le cadre d’un trading intraday, je souhaiterais qu’à l’ouverture des marchés le prix médian = DOpen(0)

    D’avance Merci pour votre aide

    Cordialement

    #96597 quote
    Nicolas
    Keymaster
    Master

    Merci de poster le code en question afin de mieux comprendre la demande et d’éviter de chercher de quoi il s’agit 🙂

    Il y a un code de median renko disponible ici, pour info: Median renko boxes on price

    #96606 quote
    marc.v
    Participant
    New

    Bonjour Nicolas

    Il s’agit du code suivant:

    boxSize = 40
    renkoMedian = (renkoMax + renkoMin)/2

    once renkoMax = ROUND(close / boxSize) * boxSize
    once renkoMin = renkoMax – boxSize

    IF high > renkoMax + boxSize THEN
    WHILE high > renkoMax + boxSize
    renkoMax = renkoMax + boxSize
    renkoMin = renkoMin + boxSize
    WEND

    ELSIF low < renkoMin – boxSize THEN
    WHILE low < renkoMin – boxSize
    renkoMax = renkoMax – boxSize
    renkoMin = renkoMin – boxSize
    WEND
    ENDIF

    RETURN renkoMax as “RMax40”, renkoMin as “RMin40”,renkoMedian as “Median”

    #96647 quote
    Nicolas
    Keymaster
    Master

    Donc si je comprends bien il faut réinitialiser la première valeur de la barre renko avec la valeur de la première barre du jour ?

    #96651 quote
    marc.v
    Participant
    New

    Oui exactement

    La valeur médiane de la 1ère barre renko doit être égale au cours d’ouverture du jour DOpen(0)

    #96812 quote
    Nicolas
    Keymaster
    Master

    Le renkomedian de ce code est le milieu de la barre renko calculé avec renkomax et renkomin.

    boxSize = 15
    renkoMedian = (renkoMax + renkoMin)/2
    
    once renkoMax = ROUND(close / boxSize) * boxSize
    once renkoMin = renkoMax - boxSize
    
    if dopen(0)<>dopen(0)[1] then 
    //renkomax = ROUND(dopen(0) / boxSize) * boxSize
    //renkoMin = renkoMax - boxSize
    renkomedian = dopen(0)
    renkomax=renkomedian+boxsize/2
    renkomin=renkomedian-boxsize/2
    drawvline(barindex)
    endif
    
    IF high > renkoMax + boxSize THEN
    WHILE high > renkoMax + boxSize
    renkoMax = renkoMax + boxSize
    renkoMin = renkoMin + boxSize
    WEND
    
    ELSIF low < renkoMin - boxSize THEN
    WHILE low < renkoMin - boxSize
    renkoMax = renkoMax - boxSize
    renkoMin = renkoMin - boxSize
    WEND
    ENDIF
    
    RETURN renkoMax as "RMax40", renkoMin as "RMin40",renkoMedian as "Median",dopen(0) coloured(200,0,0)

    J’ai ajouté une ligne verticale pour marqué le moment ou Dopen change. La valeur de Dopen(0) est une ligne rouge continue.

    marc.v thanked this post
    #96819 quote
    marc.v
    Participant
    New

    Merci Nicolas

    Ce code répond parfaitement à ma demande

    Cordialement

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.

Initialiser le graphique Renko avec le DOpen chaque jour


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
marc.v @marc-v Participant
Summary

This topic contains 6 replies,
has 2 voices, and was last updated by marc.v
6 years, 10 months ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 04/16/2019
Status: Active
Attachments: No files
Logo Logo
Loading...