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

Re: [amibroker] Query chart timeframe?



PureBytes Links

Trading Reference Links

INTERVAL
- get bar interval (in seconds)

Date/Time
(AFL 2.1)


SYNTAX interval( format = 0 )
RETURNS NUMBER
FUNCTION Interval() function returns bar interval.

Possible formats: format = 0 - returns bar interval in seconds format = 1 - as above plus TICK bar intervals are returned with negative sign so Interval() function applied to 10 tick chart will return -10 format = 2 - returns STRING with name of interval such as "weekly/monthly/daily/hourly/15-minute/5-tick"

Example time intervals in seconds:
tick bars = 0
5 sec bars = 5
1 min bars = 60
hourly bars = 3600
daily bars = 86400
weekly bars = 432000
monthly bars = 2160000 (216e4)

EXAMPLE "Interval in seconds " + WriteVal( Interval() );
SEE ALSO  

References

 
----- Original Message -----
Sent: Monday, January 09, 2006 12:33 PM
Subject: [amibroker] Query chart timeframe?

Hi,
 
Is it possible, in AFL code, to query which timeframe ( D, W, M, custom ) is currently selected when viewing charts? I have added custom timeframes to my View toolbar and I would like to try writing some code that automatically tightens up indicator parameters when I switch to longer timeframes. Thank you!
 
Steve


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 other support material please check also:
http://www.amibroker.com/support.html





SPONSORED LINKS
Investment management software Real estate investment software Investment property software
Software support Real estate investment analysis software Investment software


YAHOO! GROUPS LINKS