Forum

Function for waiting for next candle to close?

I'm writing 2 bool functions that check if certain conditions are met before executing a trade. The first function checks the previous candle. The 2nd function is meant to check conditions of the next 2 candles that form after the 1st confirmation candle. Only when both functions return True, the

'else' expressions are not allowed on a global space

I keep getting this error along with '}' expressions are not allowed on a global space as well. I wrote a function in an include file and am trying to call it from main OnStart program. The function worked just fine before putting it into the include file so I can't understand what the issue is