I would like to write my own Daily Pivot Points calculated from midnight to midnight. Is this possible to do in the IntelliScript?
A16: Example script for the Daily Pivot Points calculated from midnight to midnight that will be shown on hourly and smaller time frames: Local midnighttp,midinx Global dayO=-1 Global dayC=-1 Global dayH=-1 Global dayL=-1 If getBarTime(1) midinx=GetIndexByTimePoint(midnighttp) If midinx>0 then dayC=close[1] dayO=open[midinx] dayH=HHV(high,midinx) dayL=LLV(low,midinx) Endif Endif If dayH>0 then Local MyPivot=(dayH+dayL+dayC)*0.333 Local S1 = MyPivot – (dayH – MyPivot) //S1 Line Local S2 = MyPivot – (dayH – dayL) //S2 Line Local S3 = dayL – (dayH – dayL) //S3 Line Local R1 = MyPivot + (MyPivot – dayL) //R1 Line Local R2 = MyPivot + (dayH – dayL) //R2 Line Local R3 = dayH + (dayH – dayL) //R3 Line HLine MyS1 = S1 MyS1.Color = “Blue” HLine MyS2 = S2 MyS2.Color = “Blue” HLine MyS3 = S3 MyS3.Color = “Blue” HLine MyR1 = R1 MyR1.Color = “Red” HLine MyR2 = R2 MyR2.Color = “Red” HLine MyR3 = R3 MyR3.Color = “Red” HLine MyLastHigh = dayH MyLastHigh.Color = “Black” HLine MyLastLow = dayL MyLastLow