hi, I want to calculate pivot lines like show in the top chart. The chart shows regular trading hours only. I can simple set the database setting to show regular trading hours. However, I am trying to calculate these lines using the regular trading hours but setting the chart to display 24 hours.
For the pivot point calculation I need the H, L and C of the day. To solve this you need to generate an array that during a period of 24 hours shows the H of the regular trading hours period. For example to construct an array that contains the high value of the day I tried: DDH = IIf(timearr >= starttime AND timearr <= endtime,H,Null); DDH = IIf(timearr >= 000000 AND timearr <= starttime,deTimeRangeHHV(H,starttime,endtime),DDH); DDH = IIf(timearr >= endtime AND timearr <= 240000,deTimeRangeHHV(H,starttime,endtime),DDH); from the chart you can see that the starting period of the day contains the high value of the previous day. This is not what I want. It needs to contain the high value of the current day measured during regular trading hours. Anyone have an idea how I get this done using array based calculations only? thanks, Ed
<<attachment: piv.png>>
<<attachment: piv2.png>>