@mc
As mentioned you can only declare functions(closeAllOrdersAsync) on the global scope. Here it is declared on the event handler "OnTick". But I don't think you can access the global scope from the fxdreema builder anyway.
The "OrderSendAsync" function needs 2 parameters on mql5 not 1:
Capture d’écran (703).png
M