tracer un point pivot en continue sur du renko

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #234757 quote
    kats
    Participant
    Junior

    Bonsoir

    je souhaite pouvoir tracer une ligne representant le point pivot du renko 8  sur du renko 2

    j’avais deja demande mais sans reponse, peut etre parce que je n'”avais pas traité le sujet seul

    merci

    cdlt

    #234771 quote
    Iván González
    Moderator
    Master

    Il y a quelque chose comme ça :

    //---RENKO SIZE 8-------------------------------------//
    boxsize=8//100//8 //renko bricks size in points/pips
    wicksize=0 //width of wicks
    //—end of settings
    size=boxsize*pointsize
    once upbox = close
    once downbox = close - size
    IF close > upbox + size THEN
    upbox = upbox + size
    downbox = downbox + size
    ELSIF close < downbox - size THEN
    upbox = upbox - size
    downbox = downbox - size
    ENDIF
    //-----PIVOT POINTS
    prd = 10
    src1=upbox
    src2=downbox
    ////////pivothigh
    ph1 = src1 <= src1[prd]
    ph2 = highest[prd](src1) < src1[prd]
    ph3 = src1[prd] >= highest[prd](src1)[prd+1]
    if ph1 and ph2 and ph3 then
    pivotH = src1[prd]
    drawtext("▼",barindex[prd],src1[prd])coloured("red")
    else
    pivotH = pivotH
    endif
    ////////pivotlow
    pl1 = src2 >= src2[prd]
    pl2 = lowest[prd](src2) > src2[prd]
    pl3 = src2[prd] <= lowest[prd](src2)[prd+1]
    if pl1 and pl2 and pl3 then
    pivotL = src2[prd]
    drawtext("▲",barindex[prd],src2[prd])coloured("green")
    else
    pivotL = pivotL
    endif
    //----RENKO 2
    //—settings
    boxsize2=2//renko bricks size in points/pips
    transparency2=100 //brick colours alpha
    wicksize2=0 //width of wicks
    //—end of settings
    size2=boxsize2*pointsize
    
    once upbox2 = close
    once downbox2 = close - size2
    once lowwick2 = close*100
    
    IF close > upbox2 + size2 THEN
    upbox2 = upbox2 + size2
    downbox2 = downbox2 + size2
    r=0
    g=200
    begin2=barindex
    highwick2=close
    wickbar2=barindex-round((barindex-begin2[1])/2)
    ELSIF close < downbox2 - size2 THEN
    upbox2 = upbox2 - size2
    downbox2 = downbox2 - size2
    r=200
    g=0
    begin2=barindex
    wickbar2=barindex-round((barindex-begin2[1])/2)
    ENDIF
    
    //draw renko candlesticks
    drawcandle(upbox2,upbox2,downbox2,downbox2)coloured(r,g,0,min(transparency2,255))
    
    return upbox as "Renko8 Up"coloured("blue"), downbox as "Renko8 Dw" coloured("blue"), pivotH as "PivotH" coloured("green"), pivotL as "PivotL"coloured("red")
    #234782 quote
    kats
    Participant
    Junior

    bonjour

    non ca ne correspond pas a  ce que je voudrai.

    il y trop de ligne je voudrai juste une ligne qui suit le cours du renko 2 mais qui correspond au pivot renko 8  (dans le principe qui monte tous les 4 points et baisse de la même facon)

    cdlt

    #234939 quote
    Iván González
    Moderator
    Master

    D'ACCORD. Je comprends que vous vouliez le point pivot. Dans ce cas, vous pouvez profiter du code que j'ai fourni et introduire le calcul du point pivot dans la définition de Renko8.

    //----Pivot
    PP=(upbox[1]+downbox[1]+lastclose[1])/3
    #235521 quote
    kats
    Participant
    Junior

    Bonsoir

    Ca ne fonctionne pas non plus

    si je l affiche dans une fenetre sous graphique ca met bien une ligne mais ca ne s’affiche pas lorsque je le mets sur le graphique de prix

     

    Pouvez vous me mettre le code avec la modif pour voir si j’ai fait les choses correctement svp

     

    cdlt

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

tracer un point pivot en continue sur du renko


Support Plateforme : Graphiques, Données & Courtiers

New Reply
Author
author-avatar
kats @kats Participant
Summary

This topic contains 4 replies,
has 2 voices, and was last updated by kats
1 year, 6 months ago.

Topic Details
Forum: Support Plateforme : Graphiques, Données & Courtiers
Language: French
Started: 07/03/2024
Status: Active
Attachments: No files
Logo Logo
Loading...