Real Time Feed Data :use the SQL Server database to store prediction value from matchine learning


I want to use ODBC/SQL Universal Data to display price data(OHLCV) in the real-time feed(Time frame 15 M), my database is the SQL Server database.

In addition to OHLCV, I have prediction value from Machine learning as well, they are stored in a table in SQL database,
But as far as I see in the document as link below.

is it possible to store prediction value from ML in OPENINT column?

the data type of prediction value is just integer, it is the same type as Open In.

Can I do this?


Sure you can retrieve from SQL DB and store to OPENINT field



BTW, please do not wrote "essays" into thread subject.

1 Like

Hi @fxshrat

I have a bit of a question.

My main data source is the DDE universal data plugin.
But I would like to query data from the table in SQL Server Database, in AFL code

The table has 3 columns in SQL database as below

I need to get only PredictionValue for writing logic in AFL code
buy=IIF(PredictionValue ==1 and RSI(15)>50)
For example

Graph1=odbcGetValueSQL("SELECT PredictionValue FROM mytable WHERE SYMBOL="S50IF'")

*=Graph0=odbcGetArraySQL("SELECT PredictionValue, DATE FROM mytable WHERE SYMBOL='"+Name()+"' ORDER BY DATE ASC");

  1. Is it possible to do as the SQL statement above? to bring any return value to write AFL code.