EA change into a Script [MQL5][SQL]

 

Why my EA change into a Script when I put this:

void OnStart(){
   string filename="Foreign_Exchange.sqlite";
   int Foreign_Exchange=DatabaseOpen(filename, DATABASE_OPEN_READWRITE | DATABASE_OPEN_CREATE |DATABASE_OPEN_COMMON);
   if(DatabaseTableExists(Foreign_Exchange, _Symbol) == false)
     {
      DatabaseExecute(Foreign_Exchange,
                      StringFormat("CREATE TABLE %s("
                                   "ID INT PRIMARY KEY,"
                                   "EVENT_ID INT NOT NULL,"
                                   "CURRENCY TEXT NOT NULL,"
                                   "COUNTRY TEXT NOT NULL,"
                                   "COUNTRY_ID INT NOT NULL,"
                                   "NEWS TEXT NOT NULL,"
                                   "NEWS_CODE TEXT NOT NULL,"
                                   "CALENDAR_IMPORTANCE INT NOT NULL,"
                                   "TYPE_INDICATOR INT,"
                                   "SECTOR_BUSINESS INT,"
                                   "FREQUENCY_MONTH INT,"
                                   "TIME TEXT NOT NULL,"
                                   "IMPACT INT NOT NULL,"
                                   "ACTUAL_VALUE REAL,"
                                   "FORECAST_VALUE REAL,"
                                   "PREV_VALUE REAL,"
                                   "PRICE REAL NOT NULL,"
                                   "HIGHPRICE_15M REAL NOT NULL,"
                                   "HIGHPRICE_30M REAL NOT NULL,"
                                   "HIGHPRICE_1H REAL NOT NULL,"
                                   "HIGHPRICE_2H REAL NOT NULL,"
                                   "LOWPRICE_15M REAL NOT NULL,"
                                   "LOWPRICE_30M REAL NOT NULL,"
                                   "LOWPRICE_1H REAL NOT NULL,"
                                   "LOWPRICE_2H REAL NOT NULL,"
                                   "VALIDITY REAL NOT NULL,"
                                   "RELIABILITY REAL NOT NULL,"
                                   "TAKEPROFIT REAL NOT NULL,"
                                   "PROBABILITY REAL NOT NULL);",_Symbol));
     }
   DatabaseClose(Foreign_Exchange);
  }
 
Yovanis Pineda: Why my EA change into a Script when I put this:

Perhaps you should read the manual.
   How To Ask Questions The Smart Way. 2004
      How To Interpret Answers.
         RTFM and STFW: How To Tell You've Seriously Screwed Up.

Only scripts have an OnStart.
          Event Handling Functions - MQL4 Reference

 
William Roeder:

Perhaps you should read the manual.
   How To Ask Questions The Smart Way. 2004
      How To Interpret Answers.
         RTFM and STFW: How To Tell You've Seriously Screwed Up.

Only scripts have an OnStart.
          Event Handling Functions - MQL4 Reference

Thanks!
Reason: