Inizio = 090000
Fine = 130000
IF OpenTime = Inizio THEN
myOpen = open
myHigh = high
myLow = low
myClose = close
ENDIF
IF OpenTime >= Inizio AND OpenTime <= Fine THEN
myHigh = max(myHigh,high)
myLow = min(myLow,low)
myClose = close
ENDIF
// Pivots
Pivot = (High + Low + Close) / 3 //Pivot
//
ResR1 = Pivot + (Pivot - myLow)
ResR2 = Pivot + (myHigh - myLow)
ResR3 = myHigh + (2 * (Pivot - myLow))
//
SupS1 = Pivot - (myHigh - Pivot)
SupS2 = Pivot - (myHigh - myLow)
SupS3 = myLow - (2 * (myHigh - Pivot))
RETURN Pivot AS "Pivot",ResR1 AS "R1",ResR2 AS "R2",ResR3 AS "R3",SupS1 AS "S1",SupS2 AS "S2",SupS3 AS "S3"