Esto muestra el trimestre anterior:
Quarter = ((OpenMonth MOD 3 ) = 1 )
IF Quarter AND Not Quarter[ 1 ] THEN
PrevOP = CurOP
PrevHI = CurHI
PrevLO = CurLO
PrevCL = CurCL
CurHI = high
CurLO = low
CurCL = close
CurOP = open
ENDIF
CurHI = max (high ,CurHI)
CurLO = min (low ,CurLO)
CurCL = close
RETURN PrevHI coloured (0 ,0 ,255 ,255 ) AS "Quarter HIGH" ,PrevLO coloured (255 ,0 ,0 ,255 ) AS "Quarter LOW" ,PrevCL coloured (0 ,255 ,0 ,255 ) AS "Quarter CLOSE" ,PrevOP coloured (0 ,0 ,0 ,255 ) AS "Quarter OPEN"
Esto muestra el trimestre actual:
Quarter = ((OpenMonth MOD 3 ) = 1 )
IF Quarter AND Not Quarter[ 1 ] THEN
CurHI = high
CurLO = low
CurOP = open
ENDIF
CurHI = max (high ,CurHI)
CurLO = min (low ,CurLO)
CurCL = close
RETURN CurHI coloured (0 ,0 ,255 ,255 ) AS "Quarter HIGH" ,CurLO coloured (255 ,0 ,0 ,255 ) AS "Quarter LOW" ,CurCL coloured (0 ,255 ,0 ,255 ) AS "Quarter CLOSE" ,CurOP coloured (0 ,0 ,0 ,255 ) AS "Quarter OPEN"
También agregué OPEN, que no solicitó (puede hacerlo invisible con propiedades).