Database base time interval

257 views
Skip to first unread message

jcor...@gmail.com

unread,
Feb 8, 2014, 7:58:58 PM2/8/14
to ami...@googlegroups.com
Hello,
I'm learning with default project for data plugin. It compiles correctly, but when I try change database time interval from Daily to ex. 5 minuts, I get "Base time interval not supported by currently selected plugin".
Why?

thx.

2014-02-09_01-24-45.jpg

zenalan

unread,
Dec 17, 2014, 11:01:31 PM12/17/14
to ami...@googlegroups.com, jcor...@gmail.com


jcor...@gmail.com於 2014年2月9日星期日UTC+8上午8時58分58秒寫道:
same problem here.. can anyone help? 

jan.ma...@gmail.com

unread,
May 10, 2016, 2:06:47 AM5/10/16
to AmiBroker Developers Group
SetTimeBase() function is called when user is changing base time interval in File->Database Settings window. It is not required for plugins that handle only daily (EOD) interval. It has to be defined for all intraday plugins. The function takes bar interval in seconds (60 for 1-minute bars, 86400 for daily bars) and should return 1 if given interval is supported by the plugin and 0 if it is not supported.

nilesh...@symphonyfintech.com

unread,
Sep 14, 2016, 3:13:53 AM9/14/16
to AmiBroker Developers Group, jan.ma...@gmail.com
Hi,

You did not mentioned how to set periodicity support for say 1 Min frequency. SetTimeBase() function is not available to call from given project. Please clarify how to allow it for intraday plugins. 

Thanks

Ranjith k r

unread,
Oct 26, 2018, 8:24:51 AM10/26/18
to AmiBroker Developers Group

Add this function in the plugin.cs

/// <summary>
        /// GetSymbolLimit function is optional, used only by real-time plugins
        /// </summary>
        [DllExport(CallingConvention = CallingConvention.Cdecl)]
        public static int SetTimeBase(int nTimeBase)
        {
            return (nTimeBase >= 60 && nTimeBase <= (24 * 60 * 60)) ? 1 : 0;
        }

This will allow you to use 1 minute format.
Reply all
Reply to author
Forward
0 new messages