Separatore di sessione

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #198354 quote
    Edisone
    Participant
    Average

    Salve,è possibile modificare il codice affinchè il separatore di sessione Weekly compaia solo quando è selezionato il time frame Weekly e viceversa il Mensile solo quando è selezionato il time frame Mensile ?

    Grazie

    Mese = 1
    Settimana = 1
    IF OpenDayOfWeek = 1 and Settimana THEN
    DRAWVLINE(barindex)coloured(210,210,210,255) style(DottedLine,1)
    ENDIF
    IF OpenMonth <> OpenMonth[1] and Mese THEN
    DRAWVLINE(barindex)coloured(210,210,210,255) style(Line,1)
    ENDIF
    RETURN
    Sepratore-di-sessione-M-W1.itf
    #198359 quote
    robertogozzi
    Moderator
    Master

    Eccolo:

    TF = GetTimeFrame
    IF TF = 2592000 THEN
       Mese      = 1
       Settimana = 0
    ELSIF TF = 604800 THEN
       Settimana = 1
       Mese      = 0
    ENDIF
    IF OpenDayOfWeek = 1 and Settimana THEN
       DRAWVLINE(barindex)coloured(210,210,210,255) style(DottedLine,1)
    ENDIF
    IF OpenMonth <> OpenMonth[1] and Mese THEN
       DRAWVLINE(barindex)coloured(210,210,210,255) style(Line,1)
    ENDIF
    RETURN
    Separatore-2.itf
    #198433 quote
    Edisone
    Participant
    Average

    GRAZIE gentilissimo,

    in aggiunta è possibile avere lo sfondo colorato alternato, es. un mese sfondo colorato l’altro mese senza colore ?

    #198434 quote
    robertogozzi
    Moderator
    Master

    Eccolo:

    ONCE t = 0
    r = 152
    g = 251
    b = 152
    t = abs(t - 1)
    TF = GetTimeFrame
       IF TF = 2592000 THEN
          Mese      = 1
          Settimana = 0
       ELSIF TF = 604800 THEN
          Settimana = 1
          Mese      = 0
       ENDIF
       IF t THEN
          backgroundcolor(r,g,b,85)    //valore trasparenza tra 0 e 255   (85 è abbastanza sfumato)
       ELSE
          backgroundcolor(255,255,255,255)
       ENDIF
       IF OpenDayOfWeek = 1 and Settimana THEN
          DRAWVLINE(barindex)coloured(210,210,210,255) style(DottedLine,1)
       ENDIF
       IF OpenMonth <> OpenMonth[1] and Mese THEN
          DRAWVLINE(barindex)coloured(210,210,210,255) style(Line,1)
       ENDIF
    RETURN

    I colori R,G,B principali puoi trovarli a questo link http://cloford.com/resources/colours/500col.htm.

    druby thanked this post
    #198437 quote
    Edisone
    Participant
    Average

    Scusami ma mi sono sbagliato, avrei bisogno che il separatore di sessione Weekly compaia solo quando è selezionato il time frame DAILY e viceversa il Mensile solo quando è selezionato il time frame WEEKLY.

    Scusami ancora e grazie nuovamente.

    #198444 quote
    druby
    Participant
    New

    Modifica al codice di roberto. Questo potrebbe farlo!

    r = 50
    g = 50
    b = 50
    TF = GetTimeFrame
    IF TF = 86400 THEN // 1day 
    Mese      = 0
    Settimana = 1
    ELSIF TF = 604800 THEN // 1week 
    Settimana = 0
    Mese      = 1
    ENDIF
    IF (openMonth mod 2) and (Mese or Settimana)THEN
    backgroundcolor(r,g,b,10)    //valore trasparenza tra 0 e 255   (85 è abbastanza sfumato)
    ELSE
    backgroundcolor(255,255,255,255)
    ENDIF
    
    IF OpenDayOfWeek = 1 and Settimana THEN // Settimana week
    DRAWVLINE(barindex)coloured(210,210,210,255) style(DottedLine,1)
    ENDIF
    IF OpenMonth <> OpenMonth[1] and Mese THEN // Mese month
    DRAWVLINE(barindex)coloured(210,210,210,255) style(DottedLine,2)
    ENDIF
    RETURN
    robertogozzi and Edisone thanked this post
    #199834 quote
    Edisone
    Participant
    Average

    Grazie, è possibile impostare anche nel grafico Daily una settimana di un colore e la sucessiva di un’ altro ?

    Grazie ancora

    #199839 quote
    robertogozzi
    Moderator
    Master

    Ecco fatto:

    ONCE Flip = 1
    Flip = abs(Flip - 1)
    r = 50
    g = 50
    b = 50
    rw = 50
    gw = 50
    bw = 50
    tw = 20
    TF = GetTimeFrame
    IF TF = 86400 THEN // 1day
    Mese      = 0
    Settimana = 1
    ELSIF TF = 604800 THEN // 1week
    Settimana = 0
    Mese      = 1
    ENDIF
    IF (openMonth mod 2) and (Mese or Settimana)THEN
    backgroundcolor(r,g,b,20)    //valore trasparenza tra 0 e 255   (85 è abbastanza sfumato)
    ELSE
    backgroundcolor(255,255,255,255)
    ENDIF
     IF OpenDayOfWeek = 1 and Settimana THEN // Settimana week
    DRAWVLINE(barindex)coloured(210,210,210,255) style(DottedLine,1)
    ENDIF
    IF OpenMonth <> OpenMonth[1] and Mese THEN // Mese month
    DRAWVLINE(barindex)coloured(210,210,210,255) style(DottedLine,2)
    ENDIF
    IF TF = 604800 THEN
    IF Flip THEN
    rw = 255
    gw = 255
    bw = 255
    tw = 255
    backgroundcolor(255,255,255,255)
    ENDIF
    backgroundcolor(rw,gw,bw,tw)
    ENDIF
    RETURN
    #199842 quote
    Edisone
    Participant
    Average

    Grazie Roberto scusami ma non mi funziona,

    ricapitolo:

    Time frame Daily = settimane alterne: es. questa settimana da lunedi a venerdi sfondo bianco, la settimana precedente da lunedi a venerdi sfondo azzurro e cosi via.

    Time frame Weekly= mesi alterni: es. le settimane di questo mese sfondo bianco, le settimane del mese precedente sfondo azzurro e cosi via.

    Grazie

    #199877 quote
    robertogozzi
    Moderator
    Master

    Eccolo:

    ONCE Flip = 0
    ONCE TF = GetTimeFrame
    IF TF = 86400 THEN // 1day
       Mese      = 0
       Settimana = 1
    ELSIF TF = 604800 THEN // 1week
       Settimana = 0
       Mese      = 1
    ENDIF
    IF ((openMonth <> OpenMonth[1]) and Mese) or ((OpenDayOfWeek < OpenDayOfWeek[1])and Settimana)THEN
       Flip = abs(Flip - 1)
    ENDIF
    IF Flip THEN
       backgroundcolor(50,50,50,30)    //valore trasparenza tra 0 e 255   (85 è abbastanza sfumato)
    ELSE
       backgroundcolor(255,255,255,255)
    ENDIF
    IF OpenDayOfWeek = 1 and Settimana THEN // Settimana week
       DRAWVLINE(barindex)coloured(210,210,210,255) style(DottedLine,1)
    ENDIF
    IF OpenMonth <> OpenMonth[1] and Mese THEN // Mese month
       DRAWVLINE(barindex)coloured(210,210,210,255) style(DottedLine,2)
    ENDIF
    RETURN
    Edisone thanked this post
    #200611 quote
    Edisone
    Participant
    Average

    Buongiorno se possibile avrei una richiesta di modifica del codice che allego. Solo nel TF Mese avrei la necessità di disegnare delle linee verticali ogni trimestre solo dell’ultimo anno (corrente).

    Grazie

    Saluti

    ONCE Flip = 0
    ONCE TF = GetTimeFrame
    LineeVerticali=1
    IF TF = 86400 THEN // 1day
    Mese      = 0
    Settimana = 1
    Anno = 0
    ELSIF TF = 604800 THEN // 1week
    Settimana = 0
    Mese      = 1
    Anno = 0
    ELSIF TF = 2592000 THEN // 1mese
    Settimana = 0
    Mese      = 0
    Anno = 1
    ENDIF
    IF ((openMonth <> OpenMonth[1]) and Mese) or ((OpenDayOfWeek < OpenDayOfWeek[1])and Settimana)THEN
    Flip = abs(Flip - 1)
    ENDIF
    IF ((OpenYear <> OpenYear[1]) and Anno)THEN
    Flip = abs(Flip - 1)
    ENDIF
    IF Flip THEN
    backgroundcolor(255,255,255,255)    //valore trasparenza tra 0 e 255   (85 è abbastanza sfumato) (50,50,50,30)
    ELSE
    backgroundcolor(50,50,50,15)//(255,255,255,255)
    ENDIF
    IF OpenDayOfWeek = 1 and Settimana and LineeVerticali=1 THEN // Settimana week
    DRAWVLINE(barindex)coloured(210,210,210,255) style(DottedLine,1)
    ENDIF
    IF OpenMonth <> OpenMonth[1] and Mese and LineeVerticali=1 THEN // Mese month
    DRAWVLINE(barindex)coloured(210,210,210,255) style(DottedLine,2)
    ENDIF
    IF OpenYear <> OpenYear[1] and Anno and LineeVerticali=1 THEN // Mese month
    DRAWVLINE(barindex)coloured(210,210,210,255) style(DottedLine,2)
    ENDIF
    RETURN
    #200735 quote
    robertogozzi
    Moderator
    Master

    Eccolo:

    ONCE Flip = 0
    ONCE TF = GetTimeFrame
    LineeVerticali=1
    IF TF = 86400 THEN // 1day
    Mese      = 0
    Settimana = 1
    Anno      = 0
    ELSIF TF = 604800 THEN // 1week
    Settimana = 0
    Mese      = 1
    Anno      = 0
    ELSIF TF = 2592000 THEN // 1mese
    Settimana = 0
    Mese      = 0
    Anno      = 1
    ENDIF
    IF ((openMonth <> OpenMonth[1]) and Mese) or ((OpenDayOfWeek < OpenDayOfWeek[1])and Settimana)THEN
    Flip = abs(Flip - 1)
    ENDIF
    IF ((OpenYear <> OpenYear[1]) and Anno) THEN
    Flip = abs(Flip - 1)
    ENDIF
    IF Flip THEN
    backgroundcolor(255,255,255,255)    //valore trasparenza tra 0 e 255   (85 è abbastanza sfumato) (50,50,50,30)
    ELSE
    backgroundcolor(50,50,50,15)//(255,255,255,255)
    ENDIF
    IF OpenDayOfWeek = 1 and Settimana and LineeVerticali=1 THEN // Settimana week
    DRAWVLINE(barindex)coloured(210,210,210,255) style(DottedLine,1)
    ENDIF
    IF OpenMonth <> OpenMonth[1] and Mese AND Anno = 0 and LineeVerticali=1 THEN // Mese month
    DRAWVLINE(barindex)coloured(210,210,210,255) style(DottedLine,2)
    ENDIF
    IF OpenMonth <> OpenMonth[1] and Anno AND LineeVerticali=1 AND ((OpenMonth MOD 3) = 1) THEN // Trimestre
    DRAWVLINE(barindex)coloured(210,210,210,255) style(DottedLine,2)
    ENDIF
    
    IF OpenYear <> OpenYear[1] and Anno and LineeVerticali=1 THEN // Mese month
    DRAWVLINE(barindex)coloured(210,210,210,255) style(DottedLine,2)
    ENDIF
    RETURN
    Edisone thanked this post
    #207743 quote
    Edisone
    Participant
    Average

    Buongiorno,

    è possibile avere il separatore di sessione solo esclusivamente nel TF 30 minuti ?

    Esempio giornata di oggi sfondo trasparente, giornata di ieri sfondo colorato.

    Grazie mille

    #207751 quote
    Edisone
    Participant
    Average

    Buongiorno,

    è possibile aggiungere al codice anche la possibilità di avre il  separatore di sessione anche nel TF 30 minuti ?

    Come per gli altri time frame giornata di oggi sfondo trasparente, giornata di ieri sfondo colorato.

    Grazie mille

    #208578 quote
    robertogozzi
    Moderator
    Master

    Eccolo:

    ONCE Flip = 0
    ONCE TF = GetTimeFrame
    LineeVerticali=1
    IF TF = 86400 THEN // 1day
    Mese      = 0
    Settimana = 1
    Anno      = 0
    Min30     = 0
    ELSIF TF = 604800 THEN // 1week
    Settimana = 0
    Mese      = 1
    Anno      = 0
    Min30     = 0
    ELSIF TF = 2592000 THEN // 1mese
    Settimana = 0
    Mese      = 0
    Anno      = 1
    Min30     = 0
    ELSIF TF = 1800 THEN   //30 minuti
    Settimana = 0
    Mese      = 0
    Anno      = 0
    Min30     = 1
    ENDIF
    IF ((openMonth <> OpenMonth[1]) and Mese) or ((OpenDayOfWeek < OpenDayOfWeek[1])and Settimana)THEN
    Flip = abs(Flip - 1)
    ENDIF
    IF ((OpenYear <> OpenYear[1]) and Anno) THEN
    Flip = abs(Flip - 1)
    ENDIF
    IF TF = 1800 AND (OpenDay <> OpenDay[1]) THEN
    Flip = abs(Flip - 1)
    ENDIF
    IF Flip THEN
    backgroundcolor(255,255,255,255)    //valore trasparenza tra 0 e 255   (85 è abbastanza sfumato) (50,50,50,30)
    ELSE
    backgroundcolor(50,50,50,15)//(255,255,255,255)
    ENDIF
    IF OpenDayOfWeek = 1 and Settimana and LineeVerticali=1 THEN // Settimana week
    DRAWVLINE(barindex)coloured(210,210,210,255) style(DottedLine,1)
    ENDIF
    IF OpenMonth <> OpenMonth[1] and Mese AND Anno = 0 and LineeVerticali=1 THEN // Mese month
    DRAWVLINE(barindex)coloured(210,210,210,255) style(DottedLine,2)
    ENDIF
    IF OpenMonth <> OpenMonth[1] and Anno AND LineeVerticali=1 AND ((OpenMonth MOD 3) = 1) THEN // Trimestre
    DRAWVLINE(barindex)coloured(210,210,210,255) style(DottedLine,2)
    ENDIF
    IF OpenYear <> OpenYear[1] and Anno and LineeVerticali=1 THEN // Mese month
    DRAWVLINE(barindex)coloured(210,210,210,255) style(DottedLine,2)
    ENDIF
    IF TF <= 1800 AND (OpenMinute MOD 30 = 0) THEN
    DRAWVLINE(barindex)coloured(210,210,210,255) style(DottedLine,2)
    ENDIF
    RETURN
    Edisone thanked this post
Viewing 15 posts - 1 through 15 (of 15 total)
  • You must be logged in to reply to this topic.

Separatore di sessione


ProBuilder: Indicatori & Strumenti Personalizzati

New Reply
Author
author-avatar
Edisone @edisone Participant
Summary

This topic contains 14 replies,
has 3 voices, and was last updated by robertogozzi
3 years, 1 month ago.

Topic Details
Forum: ProBuilder: Indicatori & Strumenti Personalizzati
Language: Italian
Started: 08/02/2022
Status: Active
Attachments: 2 files
Logo Logo
Loading...