How to set database base time interval to 10sec

Amibroker0001

as in the pic

base time interval only for tick 1sec 5sec 15sec ....

no 10 sec

how do i set the database base time interval to 10sec

It doesn't really matter, you can choose 5Sec and still get the job done.

You should also explain "Why" you really need "Only" 10 sec.

You can then define custom Intervals in Intraday settings and use accordingly for Charts and Analysis Projects.

@Kuolung you can't set the Base time interval to 10 sec. Here, you can only choose between those built-in intervals. In your case it will be either 5 or 15 seconds.

If you choose 5 seconds, later you will be able to make 10 seconds interval on the fly ...

there have few issue :

  1. all data is on the base time interval , if it is 10sec i can use 10sec 20sec , 30sec..... in my chart time interval
  2. after version 6.2x , the quotes Maximum is 1000000 , in my market , one day will have 100000 ticks , if i use the base time interval is tick , i will only can back test 10 days data

Not true:

It's the third time I've been pasting this link in the last few days :woozy_face:

2 Likes

Hahaha, I guess ppl don't take out some time patiently to search and go through the docs :smiley:

1 Like

yes , i use my own data plugin , so the default maximun bars number will be my problem

i try the amibroker , if i use the base time interval is tick , even i set chart to 1min , the system call my function

GetQuotesEx with nPeriodicity always is 0 , so i think

if i want to backtest for 1 year , in my dataplugin it must set the database bae time interval to 10s
and maximun bars to 1 1Million bars

or any suggest for it

another way , i can use two database , it need two amibroker instance , and the backtest will very difficult

@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 deliver ANYTHING but base interval. And base interval should be just set once at the database creation time. Recommended base time intervals are 1-minute, 1-second, not N-minute or N-second. This is because to construct say 13 minute chart you MUST have 1-minute base data.

Read also this:
http://www.amibroker.com/guide/x_performance.html
http://www.amibroker.com/guide/h_workspace.html

This is just my simple idea is 1s 10s 1min 10min 1hr 1day

and see the first picture , it say 1s 5s 15s .... It does not match your explanation

anyway , the database base interval only accept 1s 5s 15s ,I modified my program to fit it

so i try to make a 15s base time interval data plugin

But something strange happened see the picture Amibroker0002

you can see the in my qoute is 9:58:00 9:58:15 9:58:30 9:58:45 9:59:00 in the quote edit

but in the chart , it say the bar is 21:58:29

how to make it match quote


The reason is very simple and you can find the answer in AB documentation (which you are supposed to read before attempting to code your own plugin) following this link:

And how about the part where he says his quote is 9:XX:XX and the bar in the chart says 21:XX:XX
i'm still stumped.

some special function that detects sunlight even if the doors and windows are closed eh? :smiley:
I know 21 - 12 = 9 but maybe a windows Link will also help.

No question goes unanswered :wink: :

1 Like

so i find the answer is in the

tools -> Preferecnce -> intraday -> set START time of interval