I have a number of if's that call sub routines similar to ...
if(long==1){golong();}
if(short==1){goshort();}
etc.... next 300 lines of code
return;
golong();{
buy a long;
}
goshort();{
sell a short;
}
My question is, Can I avoid the execution of the if(short==1) statement (and 300 other lines of code) if the if(long==1) statement is executed? Do I just put a return; on the end of the golong() subroutine?
if(long==1){golong();}
if(short==1){goshort();}
etc.... next 300 lines of code
return;
golong();{
buy a long;
}
goshort();{
sell a short;
}
My question is, Can I avoid the execution of the if(short==1) statement (and 300 other lines of code) if the if(long==1) statement is executed? Do I just put a return; on the end of the golong() subroutine?
Comment