You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. Added an option to close trades in the asynchronous mode in MT5.
2. Added input parameters to filter trades by magic numbers.
3. Changed the messages about disabled auto-trading to specify whether it is disabled in the platform or in the EA.
4. Changed how the EA works when Always enforce schedule is off and the WaitForNoPositions input parameter is set to true. It will now proceed to toggle auto-trading with a schedule period if it finds that there are no more positions after the period starts.
5. Fixed a crashing error that could occur when unticking the Always enforce schedule checkbox with an empty schedule.
Schedule.Sort(0); // Sort schedule by time in ascending mode.
563
564
564
565
// Check if the previous week's last switch might be needed. It might be needed to know whether to toggle autotrading when we are inside the first period of the current week in non-enforced mode.
565
-
if (sets.Enforce == false) // Only in non-enforced mode.
566
+
if ((sets.Enforce == false) && (Schedule.Total() > 0)) // Only in non-enforced mode and if some schedule is given.
// Skip order if its magic number is in the array, and "Ignore" option is turned on.
1518
+
if ((magic == MagicNumbers_array[i]) && (IgnoreMagicNumbers)) returntrue;
1519
+
// Do not skip order if its magic number is in the array, and "Ignore" option is turned off.
1520
+
if ((magic == MagicNumbers_array[i]) && (!IgnoreMagicNumbers)) returnfalse;
1521
+
}
1522
+
1523
+
if (IgnoreMagicNumbers) returnfalse; // If not found in the array and should ignore listed magic numbers, then default ruling is - don't filter out this order.
1524
+
elsereturntrue;
1525
+
}
1526
+
1502
1527
// Returns true if weekday is actually a date for a long-term schedule.
0 commit comments