Interval
|
Date/Time |
SYNTAX | Interval( format = 0 ) |
RETURNS | NUMBER |
FUNCTION | Interval() function returns bar interval.
Possible formats:
Example time intervals in seconds:
Caveat: it is bad idea to use text comparision like this if( Interval(2) == "Weekly" ) { }. Do NOT do that, because as soon as localized version of AmiBroker arrives, your code will be broken as names will be translated. Use NUMERIC comparison, such as: if( Interval() == inWeekly ) { } instead. |
EXAMPLE | "Interval in seconds " + WriteVal( Interval() ); |
SEE ALSO |
The Interval function is used in the following formulas in AFL on-line library:
See updated/extended version on-line.