Is that it? There's a few things wrong with it.
1. main() is a custom function so has to be referenced in either the functions init(), deinit() or start(). See the documentation.
2. printf() isn't a function in mql. Print() is a function which sends a message to the expert tab of the terminal.
3. In future use for code use the SRC button.
If you want to send at init() use
int init() { Print("Hello World"); }
For every new tick, start()
int start() { Print("Hello World"); }
For when the chart changes or file is removed deinit()
int deinit() { Print("Hello World"); }
Or you can test function references:
int init() { main(); } void main() { Print("Hello World"); }
All of those should print out Hello World in the expert tab of the terminal.
Is that it? There's a few things wrong with it.
1. main() is a custom function so has to be referenced in either the functions init(), deinit() or start(). See the documentation.
2. printf() isn't a function in mql. Print() is a function which sends a message to the expert tab of the terminal.
3. In future use for code use the SRC button.
If you want to send at init() use
For every new tick, start()
For when the chart changes or file is removed deinit()
Or you can test function references:
All of those should print out Hello World in the expert tab of the terminal.
now, how to write Hello World to a file ?
now, how to write Hello World to a file ?
in theory I know how it should work ...
and yes, today it works in practice too. I don't know what was yesterday.
Maybe not enough memory, maybe I messed something up that was only recovered after reboot.
it creates a file in the directory \experts\files and writes to it
in theory I know how it should work ...
and yes, today it works in practice too. I don't know what was yesterday.
Maybe not enough memory, maybe I messed something up that was only recovered after reboot.
it creates a file in the directory \experts\files and writes to it
doesn't seem to work today, so I'm back to step 0 ...
could it be memory ? cookies ?
--------------------------------------
ok, it prints hello world from init() and from deinit()
but not from start
int init() {
Print("Hello World from init() ");
return(0); }
int deinit(){
Print("Hello World from deinit() ");
return(0);}
int start(){
Print("Hello World from start() ");
return(0); }
could it be memory ? cookies ?

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
trying since hours invain
void main(){printf("hello world");}