Hi, I'm new to programming, I have some questions, one is that I can't understand what does different returns mean, for example
return(0) , return(NULL), return(INIT_SUCCEEDED)
my second question is that how can I go from a function to another one, for example
function a ()
if (condition = true) go to function b (),
the third question is that what functions is necessary to be in our expert advisor because when I delete all the default functions and I start to write a function like below, it doesn't work and show error
thanks for your help
The documentation answers your first two questions:
You should maybe get a handle on language basics before attempting your third question.
A general programming book or tutorial may be of use to you.
Your function is correct, but you have to tell it when will be called this function, that's the "event handler".
void OnStart() //<--- when the script will start
hello(); //<----- hello(); will be called.
Then about the return :
So you should use :
int c = a + b;
Alert(hello(5,2)); // bring up an alert with 7
The third question is about event handler, you'll need : OnStart() (when it starts) ; OnTick() (when a new tick arrive) - for now I suppose it'll be enough.
It's newbie programming but I respect people who wants to learn.