Box Mensile Errore

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

    Salve chiedo aiuto per la modifica del codice per la visualizzazione del Box nel time frame Mensile e Trimestrale.
    Grazie

    DEFPARAM CALCULATEONLASTBARS  = 520 //NUMERO CANDELE PER VISUALIZZARE RISULTATI
    ONCE TF = gettimeframe
    
    If TF = 2592000 THEN     //2592000 = 1 month  (30 days)
    IF OpenMonth <> OpenMonth[1] THEN 
    IF cc > oo THEN
    DrawRectangle(Barra,Massimo,BarIndex-1,Minimo) coloured(150 ,150 ,150 ,30) bordercolor("white",0)
    ELSE
    DrawRectangle(Barra,Massimo,BarIndex-1,Minimo) coloured(150 ,150 ,150 ,30)  bordercolor("white",0)
    ENDIF
    Barra   = BarIndex
    Massimo = high
    Minimo  = low
    OO      = open
    ENDIF
    ELSIF TF = 604800 THEN                            //Weekly
    IF OpenMonth <> OpenMonth[1] THEN
    IF cc > oo THEN
    DrawRectangle(Barra,Massimo,BarIndex-1,Minimo) coloured(150 ,150 ,150 ,30) bordercolor("white",0)
    ELSE
    DrawRectangle(Barra,Massimo,BarIndex-1,Minimo) coloured(150 ,150 ,150 ,30)  bordercolor("white",0)
    ENDIF
    Barra   = BarIndex
    Massimo = high
    Minimo  = low
    OO      = open
    ENDIF
    ELSIF TF = 86400 THEN                          //Daily
    IF OpenDayOfWeek < OpenDayOfWeek[1] THEN
    IF cc > oo THEN
    DrawRectangle(Barra,Massimo,BarIndex-1,Minimo) coloured(150 ,150 ,150 ,30) bordercolor("white",0)
    ELSE
    DrawRectangle(Barra,Massimo,BarIndex-1,Minimo) coloured(150 ,150 ,150 ,30)  bordercolor("white",0)
    ENDIF
    Barra   = BarIndex
    Massimo = high
    Minimo  = low
    OO      = open
    ENDIF
    ENDIF
    
    Massimo = max(Massimo,high)
    Minimo  = min(Minimo,low)
    cc      = close
    //DrawRectangle(Barra,Massimo,BarIndex,Minimo) coloured("Grey",00) bordercolor("grey",0)
    RETURN
    
    #247959 quote
    Iván GonzálezIván González
    Moderator
    Legend

    Ecco:

    if openmonth<>openmonth[1] then
    drawrectangle(monthIdx,monthmin,barindex,monthmax)coloured("blue")
    monthIdx=barindex
    monthmax=high
    monthmin=low
    
    else
    monthmax=max(monthmax,high)
    monthmin=min(monthmin,low)
    endif
    
    if (openmonth=1 and openmonth[1]=12) or (openmonth=4 and openmonth[1]=3) or (openmonth=7 and openmonth[1]=6) or (openmonth=10 and openmonth[1]=9) then
    drawrectangle(trimIdx,trimmin,barindex,trimmax) coloured("red")
    trimIdx=barindex
    trimmax=high
    trimmin=low
    else
    trimmax=max(trimmax,high)
    trimmin=min(trimmin,low)
    endif
    
    return
    robertogozzi and Edisone thanked this post
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

Box Mensile Errore


ProBuilder: Indicatori & Strumenti Personalizzati

New Reply
Author
author-avatar
Edisone @edisone Participant
Summary

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

Topic Details
Forum: ProBuilder: Indicatori & Strumenti Personalizzati
Language: Italian
Started: 06/05/2025
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...