[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] pivot point calculation using regular trading hours in a 24 hours chart



PureBytes Links

Trading Reference Links

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
__._,_.___

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Attachment: piv.png
Description: PNG image

Attachment: piv2.png
Description: PNG image