This is pseudocode.
When the conditions are met in the if statement too many positions are opened. I just want one position to open even if the condition keeps being true.
What should I do?
int start(){
if (!ExistPositions()){
if (BUY){
OpenBuy();
return(0);
}
if (SELL){
OpenSell();
return(0);
}
}
return (0);
}
When the conditions are met in the if statement too many positions are opened. I just want one position to open even if the condition keeps being true.
What should I do?
int start(){
if (!ExistPositions()){
if (BUY){
OpenBuy();
return(0);
}
if (SELL){
OpenSell();
return(0);
}
}
return (0);
}