The Pending Order Grid is a multi-symbol multi-timeframe Expert Advisor that enables multi-strategy implementation based on pending order grids.
The Pending Order Grid allows the performing of a user-defined strategy through the creation of pending order grids. The Expert Advisor places pending orders of a given type (Buy Limit, Sell Limit, Buy Stop, or Sell Stop) at equidistant price levels to form each grid. The user might set up different grids to exist simultaneously – it's only needed to attach the EA on multiple chart windows of the intended symbol(s).
The start and stop of a grid might be chosen between two modes: price or time. Depending on the selected modes, the trading robot only starts placing pending orders when the current price is "near" the first target price (Start Price) or the Start Time is reached and stops placing when the last target price exceeds the Stop Price or the Stop Time is reached, where Start Price, Start Time, Stop Price and Stop Time are input parameters.
A pending order placing is regulated by a price interval, whose limits are at the Stop Level and Stop Level + Extra Level distances from the order’s target price, where Extra Level is an input parameter. Every time new quotes are available, and the symbol's price is at this interval, the pending order is placed. The target price of the next order is simply given by the previous one added (Sell Limit or Buy Stop) or subtracted (Buy Limit or Sell Stop) with the Price Level input parameter.
An exception to the previous procedure is when the grid’s first pending order is triggered by the Start Time. In this case, the trading robot tries immediately placing the order at the Stop Level distance. In case of rejection by the trade server, it will add 1 pip to the previous distance and try again for the order placing. This procedure will be repeated until the Stop Level + Extra Level distance is reached.
The maximum number of simultaneous pending orders placed by the EA is given by the expression:
where Ceil represents the usual maths function. The expression may take the following values:
The volume used to place a pending order is chosen between a fixed and a variable lot size, available through the Volume and Free Margin % input parameters, respectively. If there isn't enough money in the account for the chosen volume, a request for placing the order is still sent to the trade server. The purpose is to allow the corresponding position opening if the free margin increases enough until the target price is reached. This increase could be due to an account deposit or position profit between the placing and triggering of the pending order.
PENDING ORDER GRID
PENDING ORDER PLACING
POSITION MODIFYING
OPTIMIZATION CRITERION
Some of the available parameters accept values that lead to particular options.
The input parameters that define the limits of the grid must obey a few rules.
The Expert Advisor allows the creation and use of a new statistical parameter (besides available ones) to sort the optimization results. This custom statistic parameter results from a mathematical expression calculated after the testing. The expression must obey syntax rules and precedence order, being constituted by the following elements:
The statistical parameters are used by writing the respective identifier initial(s) after the term “STAT”. In case there are two identifiers with the same initial(s), it must also be added “1” or “2”, depending on the order in which both appear in the list. For instance, “STAT_PROFIT” and “STAT_MAX_CONLOSS_TRADES” would be “P” and “MCT2”, respectively. List of identifiers, without “STAT_”, whose initial(s) require “1” or “2”:
CONPROFITMAX (C1), CONPROFITMAX_TRADES (CT1), MAX_CONWINS (MC1), MAX_CONPROFIT_TRADES (MCT1), CONLOSSMAX (C2), CONLOSSMAX_TRADES (CT2), MAX_CONLOSSES (MC2), MAX_CONLOSS_TRADES (MCT2), EQUITYDD_PERCENT (EP1), EXPECTED_PAYOFF (EP2), LOSS_TRADES (LT1), LONG_TRADES (LT2).
The mathematical/trigonometric functions are used by writing the respective name after “Math” and one or two arguments inside parentheses, separated by a comma in this last case. For instance, “MathLog10()” and “MathPow()” would be “Log10(argument)” and “Pow(argument1,argument2)”, respectively. List of names that correspond to the available functions:
Abs, Arccos, Arcsin, Arctan, Arctan2, Ceil, Cos, Exp, Floor, Log, Log10, Max, Min, Mod, Pow, Rand, Round, Sin, Sqrt, Tan, Expm1, Log1p, Arccosh, Arcsinh, Arctanh, Cosh, Sinh, Tanh.
Note: “MathRand()” is only executed with “GetTickCount()” as the argument of “MathSrand()”, it’s used without anything inside parentheses – simply writing “Rand()”.
Additionally, the expression has the following properties:
Examples of a number representation using various notations: “0.0000325” (decimal), “3.25*10^-5” (scientific), “32.5*10^-6” (engineering) and “32.5E-6” (E).
IMPORTANT! The EA doesn’t verify if the input expression fulfils all the requirements, namely if it obeys syntax/standard rules, hence, any infringement of these leads to an unreliable result.
The Expert Advisor possesses a vast number of messages to inform the user about errors and conditions changes that might occur during its operation. The messages are shown through the Alert function (by a pop-up window), its content includes:
Note: Some elements of the list are displayed simultaneously (in the same text line): 5, 6 and 7; 7 and 8.
During the EA’s operation, the messages displayed are grouped by kind of occurrence (related to each list’s element, except the 1, 6 and 8) and counted. Immediately before the EA’s unloading, a final message containing those groups with the respective counts (if these were > 0) is presented.
Following the EA's (re)initialization, two reference lines are displayed in the chart at the grid’s limits (start and stop). Each line is horizontal/vertical when the grid’s limit is the price/time, respectively. Both lines are blue/red when the grid’s pending order type is Buy/Sell, respectively. Tip: Place the mouse pointer over one of those lines to see its object name ("Buy/Sell Limit/Stop – Start/Stop Price/Time"). Note: The properties of a graphical object can be edited in the Objects list.
After the EA’s testing/optimization, the result of the mathematical expression, inserted in the Math Expression input parameter, is presented in the Journal/Optimization Results tabs of the Strategy Tester window, respectively. After the EA’s testing, the values of the available statistic parameters are also presented in the Journal tab.
In some cases, the quoting session might start before or end later than the corresponding trading session (with a five-minute difference, for instance). During the time interval when the quoting session is open, but the trading session is still/already closed, the Expert Advisor initiates/continues to process the available ticks, respectively. If the present conditions satisfy the EA's trading criteria, a trade request is formed and sent to the server. However, it won’t succeed, and an error message is displayed: “Trade request sending failed; Market is closed”.
During high activity periods, the trade server’s decision on whether a trade request is executed or rejected may suffer significant delays. Some data used in the request sent to the server might become incorrect, leading to the order’s rejection. When the server is evaluating a request and the symbol's quotes are updated, three cases might occur:
The symbol’s quotes mentioned in the sixth element of the list in the Displayed Information section are especially useful here (since firsts usually differ from lasts). A careful analysis of these quotes, knowing the implication that certain quote changes have on the request’s evaluation, permits understanding the reason when these cases occur. To avoid the request’s rejection by the trade server due to “invalid stops” (cases 1 and 2), the prices/levels used should exceed the symbol’s Stop Level by a few pips.
The Start Price, Start Time, Stop Price, Stop Time or Type input parameters have a special status in the program. Every time one is changed, two things happen: the EA ends up the current grid and verifies the conditions to create a new one. Then, if all start/stop values pass this checking, the EA begins a new grid. But, if at least one fails, the EA doesn’t go forward with the new grid and terminates its operation.
A Buy/Sell position is opened at the Ask/Bid price and closed at the Bid/Ask price. Since the position’s stop orders (Stop Loss and Take Profit) are triggered at this last price, in a pending order, they are calculated from the order's target price -/+ the current spread (Ask - Bid), respectively.
When placing a pending order, the validity period can’t be less than 1 minute. During a grid creation, the Expert Advisor doesn’t place pending orders if the current time exceeds the Expiration Time minus 1 minute (when the validity period is previously selected).
The Pending Order Grid is a helpful and efficient tool regarding the automatic creation of pending order grids, especially when the grids consist of a significant number of orders, enabling a simple and intuitive setting of the grids to form.
If for any reason you do not like the purchased program, you can request a refund within 30 days from the date of purchase. You can also make an exchange for any other product at an equal cost or by paying the difference.
Simply send a request for refund or exchange with your order number by email: [email protected].
Refund requests received more than 30 days after purchase will be rejected.