DEFPARAM DrawOnLastBarOnly = TRUE
ONCE rh = 193 //Red (rosso)
ONCE gh = 255 //Green (verde)
ONCE bh = 193 //Blue (blu')
ONCE th = 4 //Transparency (trasparenza: 0=invisibile 255=massima visibilità)
//
ONCE rl = 255 //Red (rosso)
ONCE gl = 231 //Green (verde)
ONCE bl = 186 //Blue (blu')
ONCE tl = th //Transparency (trasparenza: 0=invisibile 255=massima visibilità)
//
ONCE bf = 20 //20 barre da visualizzare nel futuro
//
IF (OpenTime = 000000) OR ((OpenTime > 000000) AND (OpenTime < OpenTime[1])) THEN
Barra = BarIndex
PPH = PHH
PPL = PLL
PHH = HH2
PLL = LL2
HH1 = high
LL1 = low
HH2 = high
LL2 = low
ENDIF
IF OpenTime < 080000 THEN
HH1 = max(HH1,high)
LL1 = min(LL1,low)
ENDIF
HH2 = max(HH2,high)
LL2 = min(LL2,low)
DrawSegment(Barra,PPH,BarIndex+bf,PPH) coloured(0,128,0,155) style(DottedLine,2)//Punti per secondo giorno preced.
DrawSegment(Barra,PPL,BarIndex+bf,PPL) coloured(0,128,0,155) style(DottedLine,2)//Punti per secondo giorno preced.
DrawSegment(Barra,PHH,BarIndex+bf,PHH) coloured(0,0,255,255) style(DottedLine,2)//Punti per giorno preced.
DrawSegment(Barra,PLL,BarIndex+bf,PLL) coloured(255,0,0,255) style(DottedLine,2)//Punti per giorno preced.
DrawSegment(Barra,HH1,BarIndex+bf,HH1) coloured(0,0,255,255) style(Line,2) //Linea per oggi
DrawSegment(Barra,LL1,BarIndex+bf,LL1) coloured(255,0,0,255) style(Line,2) //Linea per oggi
FOR i = (BarIndex+bf) DOWNTO (Barra - 1)
DrawRectangle(Barra,PHH,i,HH1) coloured(rh,gh,bh,th) bordercolor(0,0,0,0)
DrawRectangle(Barra,PLL,i,LL1) coloured(rl,gl,bl,tl) bordercolor(0,0,0,0)
NEXT
RETURN