Indicatore in area prezzo

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #238396 quote
    pignolaus
    Participant
    Average

    Buongiorno, vorrei chiedere se fosse possibile fare comparire un indicatore direttamente sul grafico del prezzo anziché  nel box separato. L’ indicatore che mi interessa in particolare è l’indice di forza relativa (paragone). Grazie

    #238399 quote
    Iván González
    Moderator
    Master

    Per mettere un indicatore nel prezzo devi trasformarlo. Per fare ciò, puoi prendere come riferimento, ad esempio, un canale di massimi e minimi. Nell'esempio seguente hai un RSI all'interno del prezzo, supportato da un canale Donchian.

    //-----------------------------------------------------------------//
    //PRC_RSI & Donchian Channel
    //Iván González Varela
    //03.06.2024
    //formacionenbolsa.com
    //-----------------------------------------------------------------//
    //-----Inputs------------------------------------------------------//
    //N=7
    //M=100
    //background=0//Color background?
    //rsilinecolor=0//color rsi line?
    //a=80
    //-----------------------------------------------------------------//
    //-----Donchian Channel--------------------------------------------//
    lmax=highest[M](high)
    lmin=lowest[M](low)
    dist=lmax-lmin
    //-----------------------------------------------------------------//
    //-----RSI---------------------------------------------------------//
    myrsi=rsi[N](close)
    RSItransf=lmin+myrsi/100*dist
    RSIOB=lmin+OB/100*dist
    RSI50=lmin+50/100*dist
    RSIOS=lmin+OS/100*dist
    //-----------------------------------------------------------------//
    //-----Pivot Points RSI
    once rsimin=100
    
    if myrsi crosses under OS then
    prevrsimin=rsimin
    prevlowprice=lowprice
    rsimin=myrsi
    lowprice=low
    elsif myRSI < OS then
    rsimin=min(myrsi,rsimin)
    lowprice=min(low,lowprice)
    else
    rsimin=rsimin
    lowprice=lowprice
    endif
    
    diver = rsimin>prevrsimin and lowprice<prevlowprice
    
    if myrsi crosses over OS and diver  and showdiv then
    drawarrowup(barindex,low-0.35*tr)coloured("green")
    endif
    //-----------------------------------------------------------------//
    //-----BackGround -------------------------------------------------//
    if background then
    if RSITransf >= RSIOB then
    backgroundcolor(255,0,0,50)
    elsif RSITransf =< RSIOS then
    backgroundcolor(0,255,0,50)
    endif
    endif
    //-----RSI Line color----------------------------------------------//
    //-----------------------------------------------------------------//
    if rsilinecolor then
    if RSITransf >= RSIOB then
    r=255
    g=0
    b=0
    elsif RSITransf =< RSIOS then
    r=0
    g=255
    b=0
    else
    r=0
    g=0
    b=255
    endif
    else
    r=0
    g=0
    b=255
    endif
    //-----------------------------------------------------------------//
    return RSItransf as "RSI price"coloured(r,g,b,a)style(line,2),lmax as "RSI 100", lmin as "RSI 0",RSIOB as "RSI OB"style(dottedline), RSI50 as "RSI 50"style(dottedline2), RSIOS as "RSI OS" style(dottedline)
    

    Tuttavia, l'indicatore da te citato non può essere trasformato poiché al momento non possiamo fare riferimento ad altri asset all'interno della finestra di pianificazione.

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

Indicatore in area prezzo


ProBuilder: Indicatori & Strumenti Personalizzati

New Reply
Author
author-avatar
pignolaus @pignolaus Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by Iván González
1 year, 4 months ago.

Topic Details
Forum: ProBuilder: Indicatori & Strumenti Personalizzati
Language: Italian
Started: 10/02/2024
Status: Active
Attachments: No files
Logo Logo
Loading...