TRADUCTION CODE INBALANCE TRADINGVIEw

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #184798 quote
    matthieuatd
    Participant
    Average

    Bonjour Pourriez vous traduire ce code de déséquilibre de marché Cordialement

    // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
    // © Travelling_Trader
    
    //@version=5
    indicator('Imbalance Finder', overlay=true, max_lines_count=500)
    
    color yellow0 = color.new(color.yellow,0)
    color gray0 = color.new(color.gray,0)
    bool showgreydiamond = input(defval=false, title='Show Diamond For Back Testing' ,group='=== Information ===')
    
    Imbcol = input.color(yellow0, 'Imbalance Colour', inline="1" ,group='=== Information ===')
    Dimcol = input.color(gray0, 'Imbalance Colour', inline="1" ,group='=== Information ===')
    TopImbalance = low[2] <= open[1] and high[0] >= close[1]
    TopImbalancesize = low[2] - high[0]
    if TopImbalance and TopImbalancesize > 0
    BOX1 = box.new(left=bar_index[1], top=low[2], right=bar_index[0], bottom=high[0])
    box.set_bgcolor(BOX1, Imbcol )
    box.set_border_color(BOX1, Imbcol )
    
    BottomInbalance = high[2] >= open[1] and low[0] <= close[1] Bonjour Pourriez vous traduire ce code de déséquilibre de marché Cordialement BottomInbalancesize = low[0] - high[2] if BottomInbalance and BottomInbalancesize > 0
    BOX2 = box.new(left=bar_index[1], top=low[0], right=bar_index[0], bottom=high[2])
    box.set_bgcolor(BOX2, Imbcol )
    box.set_border_color(BOX2, Imbcol )
    
    DownImbalance = TopImbalance and TopImbalancesize > 0
    plotshape(DownImbalance[0] and showgreydiamond, style=shape.diamond, location=location.abovebar, color=Dimcol, size=size.tiny)
    
    UpImbalance = BottomInbalance and BottomInbalancesize > 0
    plotshape(UpImbalance[0] and showgreydiamond, style=shape.diamond, location=location.belowbar, color=Dimcol, size=size.tiny)
    imbalance-finder.png imbalance-finder.png
    #185403 quote
    Nicolas
    Keymaster
    Master

    Bonjour, merci, au revoir.

    J’ai ajouté une image à ta demande, j’ai fait une recherche pour trouver à quoi ressemble l’indicateur sur un graphique.

    #185404 quote
    Nicolas
    Keymaster
    Master

    Ci-joint la traduction du code imbalance :

    TopImbalance = low[2] <= open[1] and high[0] >= close[1]
    TopImbalancesize = low[2] - high[0]
    if TopImbalance and TopImbalancesize > 0 then 
    drawcandle(low[2], low[2], high[0], high[0]) coloured(255,255,0)
    endif
    
    BottomInbalance = high[2] >= open[1] and low[0] <= close[1]  
    BottomInbalancesize = low[0] - high[2] 
    if BottomInbalance and BottomInbalancesize > 0 then 
    drawcandle(low[0], low[0], high[2], high[2]) coloured(255,255,0)
    endif
    
    return
    sharteel thanked this post
    imbalance-finder-prorealtime.png imbalance-finder-prorealtime.png
    #185434 quote
    matthieuatd
    Participant
    Average

    Merci beaucoup nicolas!

    #185557 quote
    Ptitlilou87
    Participant
    Average

    Ci-joint la traduction du code imbalance :

    J’aurai une question pour cet indicateur:est-il possible de prolonger la bougie jaune, pour que ça devienne une zone qui se dessine a droite sur le graphique, et quand le prix traverse cette zone, la zone s’arrête ?

     

    Ce serait vraiment top

     

    Merci par avance

    #213396 quote
    Alex72
    Participant
    New

    J’ai essayé de tracer des segments à partir des bougies mais je n’arrive toujours pas à faire une coloration entre les deuw segments, peut être quelqu’un pourrait nous aider avec ça ou bien même tracer un Drawrectangle à la place?

    Merci

    //https://www.prorealcode.com/topic/traduction-code-inbalance-tradingview/
    
    
    TopImbalance = low[2] <= open[1] and high[0] >= close[1]
    TopImbalancesize = low[2] - high[0]
    if TopImbalance and TopImbalancesize > 0 then
    drawcandle(low[2], low[2], high[0], high[0]) coloured(255,255,0)
    DrawSegment(BarIndex[2],low[2],BarIndex + 10,low[2]) coloured(5,5,0)
    DrawSegment(BarIndex[2],high[0],BarIndex + 10,high[0]) coloured(5,5,0)
    endif
     
    BottomInbalance = high[2] >= open[1] and low[0] <= close[1]
    BottomInbalancesize = low[0] - high[2]
    if BottomInbalance and BottomInbalancesize > 0 then
    drawcandle(low[0], low[0], high[2], high[2]) coloured(255,255,0)
    DrawSegment(BarIndex[2],high[2],BarIndex + 10,high[2]) coloured(0,0,255)
    DrawSegment(BarIndex[2],low[0],BarIndex + 10,low[0]) coloured(0,0,255)
    endif
     
    return
    //COLORBETWEEN(open,close,"RED")
    
    #213520 quote
    Nicolas
    Keymaster
    Master

    voir ton autre sujet et la réponse apportée: https://www.prorealcode.com/topic/imbalance-with-rectangle/#post-213518

    #214035 quote
    bclain21
    Participant
    New

    Bonjour,

     

    J’ai une erreur quand je fait un copier coller du code > Ligne 1 : Une des expressions suivantes serait plus approprié que “DRAWCADLE” . ENDIF

     

    J’ai essayé plusieurs code et modif, mais j’ai toujours une erreur

     

    Merci

    030523-1-Capture.png 030523-1-Capture.png 030523-2-Capture.png 030523-2-Capture.png
    #214038 quote
    JC_Bywan
    Moderator
    Master

    Bonjour,

    c’est parce que d’après la capture écran, le code semble être essayé dans une fenêtre proscreener (qui n’accepte pas les instructions graphiques telles que drawcandle) au lieu d’une fenêtre probuilder pour indicateurs. Il faut cliquer sur le bouton “indicateurs” pour y obtenir la bonne fenêtre.

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

TRADUCTION CODE INBALANCE TRADINGVIEw


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
Summary

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

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 01/07/2022
Status: Active
Attachments: 4 files
Logo Logo
Loading...