Ajouter une variable à un indicateur déjà existant

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #249586 quote
    man13270
    Participant
    New

    Bonjour à toute la communauté Prorealcode, serait-il possible d’ajouter une variable à l’indicateur (PRC_Imbalances-indicator-1) pour pouvoir choisir la taille de l’imbalance à afficher comme dans l’indicateur (FVG-1). Merci beaucoup par avance car mes connaissances en code sont trop limitées

    #249676 quote
    robertogozzi
    Moderator
    Master

    Pour appeler l’indicateur FVG depuis l’indicateur PRC_imbalances, FVG doit renvoyer une valeur, mais il s’affiche désormais à l’écran sans renvoyer de valeur.
    Pouvez-vous expliquer plus en détail ce que vous souhaitez faire ?

    #249677 quote
    man13270
    Participant
    New

    Bonjour Robertogozzi, je ne veux pas appeler l’indicateur FVG dans l’indicateur Imbalance. Je m’explique. Dans l’indicateur FVG il est possible de modifier la fairvaluegap à afficher dans le prix via une variable qui s’appelle Rango. Je voudrais faire de même avec l’indicateur Imbalance, c’est a dire modifier la taille de l’Imbalance a afficher dans le prix via une variable. Merci d’avoir pris le temps de me répondre en espérant avoir été plus précis dans ma demande.

    #249682 quote
    robertogozzi
    Moderator
    Master

    Eh bien, c’est très simple, vous pouvez utiliser ce code en changeant RANGO sur la ligne 8, ou vous pouvez importer le fichier ITF (c’est la méthode préférée) afin de pouvoir modifier la valeur avec le panneau des propriétés :

    //PRC_Imbalances indicator
    //12.10.2023
    //Nicolas @ www.prorealcode.com
    //Sharing ProRealTime knowledge
    
    defparam drawonlastbaronly=true
    
    ONCE Rango = 5
    
    REM Store support
    IF (high[2] < low) AND (abs(high[2] - low) >= Rango*PipSize) THEN
    $support[i]= high[2]
    $bar[i]=barindex
    i=i+1
    ENDIF
    
    REM Store resistance
    if (high<low[2]) AND (abs(high-low[2]) >= Rango*PipSize) then
    $res[y]= low[2]
    $resbar[y]=barindex
    y=y+1
    endif
    
    REM check support line
    if islastbarupdate and i>1 then
    for j = i-1 downto 0
    checklow = $support[j]
    bars = max(1,barindex-$bar[j])
    endbar=barindex
    for z = bars downto 1
    if low[z]<checklow then
    endbar=barindex[z]
    break
    endif
    next
    if endbar<barindex then
    drawrectangle($bar[j]-2,low[max(0,barindex-$bar[j])],endbar,$support[j]) coloured("crimson",100) bordercolor(0,0,0,0)
    ELSE
    drawrectangle($bar[j]-2,low[max(0,barindex-$bar[j])],barindex,$support[j]) coloured("yellow",100) bordercolor(0,0,0,0)
    endif
    next
    endif
    
    REM check resistance line
    if islastbarupdate and y>1 then
    for j = y-1 downto 0
    checkhigh = $res[j]
    bars = max(1,barindex-$resbar[j])
    endbar=barindex
    for z = bars downto 1
    if high[z]>checkhigh then
    endbar=barindex[z]
    break
    endif
    next
    if endbar<barindex then
    drawrectangle($resbar[j]-2,high[max(0,barindex-$resbar[j])],endbar,$res[j]) coloured("lightgreen",50) bordercolor(0,0,0,0)
    ELSE
    drawrectangle($resbar[j]-2,high[max(0,barindex-$resbar[j])],barindex,$res[j]) coloured("cyan",50) bordercolor(0,0,0,0)
    endif
    next
    endif
    
    RETURN
    man13270 thanked this post
    #249706 quote
    man13270
    Participant
    New

    Bonjour Robertogozzi, c’est exactement ce que je voulais ! Merci pour votre aide

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

Ajouter une variable à un indicateur déjà existant


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
man13270 @man13270 Participant
Summary

This topic contains 4 replies,
has 2 voices, and was last updated by man13270
5 months, 3 weeks ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 08/10/2025
Status: Active
Attachments: 3 files
Logo Logo
Loading...