Answering the Download Questions
Which answer fits which code, with examples - and why a wrong answer stops the compile.
The licensing file is built for the shape of your code. Answer from your source file, not from memory.
Question 1: Does your code have an OnInit()?
| Your code | Answer |
|---|---|
int OnInit() { ... return(INIT_SUCCEEDED); } | Yes, and it returns int (most EAs) |
void OnInit() { ... } | Yes, and it returns void |
| No OnInit anywhere | No OnInit() at all |
Question 2: Does your EA have an OnTick()?
| Your code | Answer |
|---|---|
void OnTick() { ... } | Yes (most EAs) |
No OnTick, trades from void OnTimer() | No, it runs on OnTimer() |
| Neither OnTick nor OnTimer | No OnTick() and no OnTimer() |
Question 3: Does your EA have an OnDeinit()?
This only affects tidying the badge away when the EA is removed. “Not sure” is always safe.
Special cases
- Old-style code (MT4 only): tick it if your EA uses
start()instead of OnTick(), usually withinit()instead of OnInit(). See Old-style EAs and Manual mode. - Manual mode: only for code the automatic method cannot compile.
A wrong answer cannot slip through
The file is built so that an answer that does not match your code stops the compile, instead of producing an EA that trades without a licence check. The first line of the downloaded file says which answers it was built for.
Was this guide helpful?
Thank you - that helps us improve these guides.
Need help?
Most questions are answered by the guides above. If yours is not, our team will help.
Open Support Ticket