<< Back to the General Section with a description of the settings
Description of settings related to Time Tracking
This section describes the EA ability to start and/or end trading at a specified time.
Two time range control modes are supported:
CALENDAR Mode (trading is limited to specified dates)
This mode can allow trading either within a specified calendar range (based on time), or outside a specified calendar range (if you want to block trading between specified dates). Hours and minutes for start and finish are also taken into account.
This type of trading can be used simultaneously with any other types of trading that the advisor supports.
DAILY Trading (automatic restart of trading at specified times every 24 hours)
This mode is only available within a specified calendar period, but can be enabled or disabled at the trader’s request. If the start and finish times for daily trading are equal, this mode is considered disabled. In this case, the starting time can be greater than the finishing time, which allows you to select any 24-hour ranges without regard to the beginning of the day, and the finishing time can be less than the total time for completing the cycle.
To control daily trading, there is a separate information block inside the time panel, which helps you easily navigate the current mode settings. Also, one of the advantages of this mode is the ability to select settings for a given time range directly in the tester.
Some nuances associated with DAILY trading settings:
The time settings for daily trading can be changed at any time. If the grid has already been deployed before the start of trading, the current initial grid prices will remain unchanged and the advisor will simply continue trading after reaching the specified starting time.
The time range settings for daily trading can be changed at any time. This is a safe operation and during its execution no pending orders or market positions will be deleted or closed under any circumstances. At the same time, the automatic reset of the initial grid prices can only occur at the start of each new session, and only if there are no grid orders and positions on the chart or all scheduled (in the EA settings) closing and deleting operations are completed.
If the grid has already been deployed before the start of daily trading, the current initial prices will also remain unchanged and the advisor will simply continue trading after reaching the specified start time. The same applies to restarting the terminal. That is, if the grid remained activated before closing the terminal, then when the terminal is opened, the initial prices will also remain untouched (if the finishing time remains in the future) and no deletions or closures of orders and positions will follow. But, if the finishing time has already passed, then when the terminal is opened, the grid orders will be closed.
If you need to reset the initial grid prices so that they are regenerated automatically, you can use the following method: you need to set the value "-1" in each setting responsible for the number of grid levels. Then the initial prices will be reset and the work of the adviser will stop. Then you need to set the required number of grid levels again and each grid will receive a new initial price.
---
When setting up this mode, it is also important to note that automatically restarting daily trading does not reset any values of any other tracking modes that may be running at the same time with it. There can really be a lot of different combinations here, and not all of them are easy to predict. However, the advantage of the implemented approach is not only that all this can be run once in a fully automatic mode, but also that any changes can be made to the settings at any time. That is, any chosen strategy can be adjusted after the start of trading, and the risks of sudden collapse of the entire grid will be minimized (in any case, this is exactly the concept I tried to adhere to).
General information for ALL time modes:
If you use several charts simultaneously for one trading instrument, you can set up scheduled trading in a variety of combinations. To do this, on each such chart, for each instance of the advisor, you must use different magic numbers (in addition to other different settings).
After reaching any final time, the advisor stops automatically updating its price levels. Daily trading has its own final time, and calendar trading also has its own (outside the "Only_In_Range" or inside the specified range in the "Only_Out_Range" mode)
Also, after reaching the final time, mass closing of market positions and/or deletion of pending orders in various combinations can be carried out. At the same time, CALENDAR and DAILY trading have their own settings for this. In case of daily trading, the advisor will perform the assigned task 1 time (until it is fully completed). In the case of calendar trading, until the trader turns off this mode or unloads the advisor from the chart (in the "Only_In_Range" mode).
Information opportunities: All the necessary data related to time tracking trading is displayed in a separate information panel created specifically to control all the specified time frames. Also, after the completion of the calendar (main) trading, a separate message is displayed about this, which will be impossible not to notice and ignore.
On-the-fly settings changes: Almost all settings for time-tracking trading can be adjusted even after it starts. That is, you can, without problems, change the values already set and do it an unlimited number of times. At the same time, the adviser will constantly monitor the correctness of the entered settings, thereby helping to better adjust to the current trading situation.
Variety of strategies: Trading (and information) capabilities related to time tracking can be used not only for the work of the current adviser, but also for manual trading. And with some additional settings, tracking can also be used to limit the work of any other Expert Advisors.
This mode can be improved in each new version of the advisor.
And you can always check how the current version works yourself in the strategy tester.
Example of DAILY trading (Alpha Grid MT5 1.2)
Example of CALENDAR trading only (Alpha Grid MT5 1.0)
Description of Settings
< Only In Range >
Placing and restoring orders only INSIDE the specified CALENDAR range
< Only Out Range >
Placing and restoring orders only OUTSIDE the specified CALENDAR range
< Do not Delete or Close anything >
No actions with orders and positions are required. In this case, the EA will simply stop auto-updating its price levels.
Deleting only pending orders of the Expert Advisor for the current currency instrument
Closing only market positions of the BUY type EA for the current instrument
Deleting all pending orders for the current currency INSTRUMENT
Closing only market positions of the BUY type for the current INSTRUMENT
Deleting all pending orders and market positions for the entire ACCOUNT
Deleting all pending orders for the entire ACCOUNT
Closing only market positions of the BUY type for the entire ACCOUNT