how to goto

 

How would I goto a line label in Metatrader 4

something like

if(a > b) goto fred

if(c > d) goto jim

:fred

do some some more code here

:jim

do some code here

 

You can write some code in functons instead. Something like this:

if(a > b) ReturnValue = fred();

if(c > d) ReturnValue = jim();

int fred()

{

do some some more code here

}

int jim()

{

do some code here

}

 
eacreator:
You can write some code in functons instead. Something like this: if(a > b) ReturnValue = fred(); if(c > d) ReturnValue = jim(); int fred() { do some some more code here } int jim() { do some code here }

Thanks for that, but I think some info is missing what is ReturnValue ? not a function, how do I actually write this code in MT4 thanks

Reason: