Hi,
Can someone please help me with a ODBC example afl.
What will be the AFL code to insert RSI values with DateTime in SQLlite?
Hi,
Can someone please help me with a ODBC example afl.
What will be the AFL code to insert RSI values with DateTime in SQLlite?
Install 3rd part plugin "Amibroker Plugin sqlite"
Change the afl to insert rsi values
dt=DateTime();
DBStr = "C:\\TYPE-HERE-PATH-TO-FOLDER\\test.sqlite";
SqlLog( DBStr, 0 );
CrSql = "CREATE TABLE quote (ticker text, DTime text, O numeric(7,2), C numeric(7,2), H numeric(7,2), L numeric(7,2) );";
retVal = SqlEx(DBStr, CrSql, ";");
for(k=0; k<BarCount; k++)
{
dtStr = DateTimeToStr(dt[k]);
ttext = "INSERT INTO quote (ticker, DTime, O, C, H, L) VALUES ('"+Name()+"','"+dtStr+"',%f,%f,%f,%f)";
text=StrFormat(ttext, O[k], C[k], H[k], L[k]);
retVal=SqlEx(DBStr, text, ",");
}
SqlCloseAll(",");
I can not remember from where I downloaded the 3rd part plugin “Amibroker Plug-in sqlite” from Janno. I believe it was available from Files section of Amibroker’s Yahoogroups…
Does anyone has a link to where the plugin can be downloaded ?
Hi, can anyone else help me with sqllite/mysql integration example.
The same can be achieved with ODBC plugin http://www.amibroker.com/odbc.html, see last example:
odbcExecuteSQL("INSERT INTO testtable (fieldone,symbol) VALUES ( 'somevalue','"+Name()+"' )");