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
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
GRAZIE gentilissimo,
in aggiunta è possibile avere lo sfondo colorato alternato, es. un mese sfondo colorato l’altro mese senza colore ?
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.
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.
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
Grazie, è possibile impostare anche nel grafico Daily una settimana di un colore e la sucessiva di un’ altro ?
Grazie ancora
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
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
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
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
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
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
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