DislikedI was scrolling thru the options that pop up if you type "mt5." and it looks like maybe I can just call "mt5.Close" {image} I can't test it now that its the weekend but it looks like if I just pass the symbol and ticket everything else will be handled for me. And for partial closes I can just add a line to check if I passed a volume arg, otherwise use "pos.volume" {image}Ignored
Inserted Video
Some brokers allow different order_type_fillings like FOK, IOC or RETURN. With mt5.Close(), you cannot specify it, maybe that might be the reason. Btw, many brokers offer crypto trading over the weekend.
Let me know if it helps.
1