Error when load EA which use OnCalculate with command line and configuration file

marodheure  
Hello,

I have an expert advisor to get indicator data (bband, rsi, rvi, ...), write it in a file to import the indicator data in database. I have one EA by indicator, the goal of this is just to write data in file, and not to do display.

It's work good manualy, but when i try to load this EA in command line with a configuration file i have twos errors, look the attached image on bottom please.

Unknow type, loading of () failed

Cannot load expert '' from start config

i have found than the problem is the using of the function
int OnCalculate(const int  rates_totalconst int  prev_calculatedconst datetime&  time{}const double&  open[], const double&  high[], const double&  low[], const double&  close[], const long&  tick_volume[]const long&  volume[]const int&  spread[]);

When i load with command line an EA with OnCalculate i have the error, and when i load with command line an EA without OnCalculate i haven't the error, and i don't know why.

Thank for help.

========== The configuration file ==========

[Common]

Login=xxxxxxx

KeepPrivate=1


[Charts]

ProfileLast=Default

;MaxBars=50000

;PrintColor=0

;SaveDeleted=1


[Experts]

AllowLiveTrading=1

AllowDllImport=1

Enabled=

;Account=0

;Profile=0


[StartUp]

Expert=Advisors\stockN\stockBBAND

ExpertParameters=stockN\fullHistory.set

Symbol=EURUSD

Period=M1

Template=Default.tpl

MQL5.community - User Memo
MQL5.community - User Memo
  • www.mql5.com
You can now not only read articles and download MQL5 programs, but you can also join discussions on the forum, leave comments on articles and source codes, rate MQL5 programs and share your own developments in the Code Base, and even publish articles for a decent fee (see Become an Author at MQL5.com!). MQL5.com services are constantly...
William Roeder  
marodheure: Error when load EA which use OnCalculate
OnCalculate is for indicators only. You can't have one in an EA.
marodheure  
Ha ok thank you

So i will recode it just with CopyBuffer and CopyTime.
Reason: