Hi,
i have developed a Data Plug-In for real time market data tick by tick. It is working well. But i cannot save database in another Base Time Interval than Tick although changing in DataBase Settings. Even i set Base Time Interval to 5 minutes, per example, in DataBase Settings, DataBase is saved in Tick base. What am i doing wrong?
Thank You.
Jorge Luis
@Kuolung before trying to build your own plugin you should really read the docs and familiarize with the software.
Once you do you won't be asking trivial questions.
There some absolute basics you need to understand.
Base time interval, as it name says, is a BASE interval. The FINEST interval available from the data source. AmiBroker ONLY requests data in BASE interval. All other intervals are dynamically constructed by the AmIBroker on-the-fly from base interval. The plugin does NOT need to …
The plugin does NOT need to deliver ANYTHING but base interval. And base interval should be just set once at the database creation time .
Ok, but when creating database, even if i set Base Time Interval to any value AmiBroker is saving data in Tick base mode.
@Kuolung ,
How to set database base time interval to 10 sec
If you'll go to the above-linked article (previously offered by @travick ) and read the entire thread you'll find your answer(s).
junjun
February 7, 2019, 7:12am
5
did you check the functions of data plugin :
PLUGINAPI int GetQuotesEx( LPCTSTR pszTicker, int nPeriodicity, int nLastValid, int nSize, struct Quotation *pQuotes, GQEContext *pContext )
the parameter of "nPeriodicity" is set to meet Ur base interval value ,
nPeriodicity is 0 then tick base interval ,
nPeriodicity is 1 then 1s base interval ,
nPeriodicity is 60 then 1min base interval,
and your function ( GetQuotesEx ) must check the value of nPeriodicity , then return right value of k bar data , the AB does not check it ,
Thank you. That's it! I have to fix my code.