Error 130 ist "Invalid stops"
Error 138 ist "Requote"
Kontrolliere die Werte für TP und SL. Lass sie dir am besten mit Print() direkt mit dem ASK Preis vor der Orderausführung anzeigen.
Außerdem kaufst du bei Buy kaufst du mit dem ASK Preis.
https://book.mql4.com/appendix/errors