How often does Amibroker query from SQL Server via ODBC

Hi

I use the data source as ODBC/SQL data plugin.

My question is that if I uncheck "Re-query database every 5 seconds"
How often does Amibroker query data price from SQL Server?

Note: SQL Database will update new price data every 15 minutes and that chart in Amibroker has been set TF 15m as well.

The question is described as the figure below.

ab

It accesses plugin when it needs data for particular symbol - when you display a chart of NEW symbol or use Analysis and it accesses a data for NEW symbol. Once data are read they are cached in RAM.

1 Like

Hi

I want to view a chat with this same symbol(not change to new symbol) and wait for updated data.

As my understanding (referring from http://www.amibroker.com/odbc.html)

ab

My database information has the following detail ( take a look at my figure on my question)
-Table name S50F_ML
-Columns consists of Symbol,xDate,xOpen,xHigh,xLow,xClose,xVolumn,Signal

There are 2 ways to access SQL sever database

  1. I have to write afl code in order to query data according to a current symbol like Name() in within a chart along with using RequestTimedRefresh( 900) (supposing every 15 minutes)
odbcOpenDatabase("[ODBC]
DRIVER=SQL Server
UID=SETAB
DATABASE=Tfex_AB_ML
WSID=AB-MT4
APP=AmiBroker for Windows
Trusted_Connection=Yes
SERVER=localhost\SQLEXPRESS
Description=AB_SQL-MLPrediction");

myClose=odbcGetArray("S50F_ML", "", "xClose");
//or
myClose=odbcGetArraySQL("SELECT xClose, DATE FROM S50F_ML WHERE SYMBOL='"+Name()+"' ORDER BY DATE ASC");

  1. Do the same as the first one but write in Exploration file instead

Can I do like this?

If I want to query more than one column (o ,h ,l , c) then how I will do.