Support Board
Date/Time: Fri, 26 Dec 2025 00:50:54 +0000
Post From: How to close any open trade upon removing a custom study?
| [2019-10-14 20:28:05] |
| ForgivingComputers.com - Posts: 1180 |
|
It's as simple as calling the FlattenAndCancelAllOrders() in the LastCallToFunction!
Almost. If there are no open positions or orders, you may get a trade service error. It should not be a problem, as there is nothing to cancel or flatten. I suppose it depends on your broker. |
