Hi Skeebo
There's an obvious mistake with enclosing If statement with brackets. For example compare this to your own code:

if(totallt;1)

bool buy = false;
bool sell = false;...