please how to get current time frame .
timefram = Interval ( 2 ) // returns STRING with name of interval such as "Weekly/Monthly/Daily/Hourly/15-minute/5-tick"
cul_timefram_all = IIf ( timefram == Monthly , 0 , abt ) ;
thank you
please how to get current time frame .
timefram = Interval ( 2 ) // returns STRING with name of interval such as "Weekly/Monthly/Daily/Hourly/15-minute/5-tick"
cul_timefram_all = IIf ( timefram == Monthly , 0 , abt ) ;
thank you
I think I get it
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.
http://www.amibroker.com/guide/afl/interval.html
cul_timefram_all = IIf ( Interval() == inMonthly , 0 , abt ) ;
I read it more than 10 times . God ( but it is ok the age matter is the reason )
thank you