Hey fellow traders! Are you looking for a quick way to manage your trades? With the "Close All" button, you can easily close all your open positions on the current chart in just one click.
Want to tailor your trading experience? You can choose to close only your manual trades by setting CloseOnlyManualTrades to true. If you're feeling a bit more adventurous and want to close both manual trades and those opened by an EA, simply set it to false.
This updated version is a game changer! It eliminates the problematic code found in previous versions that could cause an infinite loop:
if(checkOrderClose==false) continue;
Instead, we’ve introduced a robust error control system to prevent any infinite loops while still allowing you to close all your trades efficiently:
if(checkOrderClose == false) { int errorCode = GetLastError(); if (errorCode == 1 || errorCode == 2 || errorCode == 5 || errorCode == 6 || errorCode == 64 || errorCode == 65 || errorCode == 132 || errorCode == 133 || errorCode == 139) break; else continue; }

Comments 0