Description of the PiggyBack EA.

Description of the PiggyBack EA.

28 May 2018, 11:27
Alexander Nechaev
0
141

Advisor PiggyBack - a system that includes 3 automatic trading systems and semi-automatic trading, that is, the utility mode. All trading modes of the adviser work with the multiplication of orders and the opening of nets. The Advisor is directed to scalping trade with a large number of opened orders, but at the same time, a flexible setting allows a very serious change in the degree of aggressiveness of the trading system. This article is designed to help traders understand how to maximize the effectiveness of this trading algorithm.

Content:

  1. Modes of the Advisor's work, their general description of strategies and their differences among themselves.
  2. Input variables and how their change affects the trade of the advisor.

Modes of the Advisor's work, their general description of strategies and their differences among themselves:

In Advisor PiggyBack there are 4 modes of operation, let's get acquainted with each of them in detail.

  • Manual_Mode - Manual trading mode with the help of the trading panel, it allows you to manually bring order groups opened by an adviser or conduct a full manual trading. Open orders are accompanied by restoring grids of the PiggyBack_SmartGrids mode;

Picture №1. The appearance of the EA Advisor's trading panel:



In this mode of operation, the Expert Advisor is used as a utility, it does not open the first order independently, but will accompany any open order using the Advisor panel or a Chart order, OrderMagicNumber of which corresponds to Magic Orders   advisor. How the order is escorted:

Unlike standard order grids, the advisor will use restoring orders with a filter that is designed for the PiggyBack_SmartGrids mode, the basis of this mode is the trend reversal. The adviser, if the order is unprofitable, will wait not only for the moment when the distance from the previous order is equal to Step , but also wait for a signal about a possible reversal of the trend. When you display a group of orders in profit equal to TrailingStart_Money , the advisor will launch the trailing algorithm in the deposit currency.

  • PiggyBack_Standard - Unguided grid system, the trade begins with the opening of two different orders, when closing, again opens two different orders, one of which is increased by the multiplier coefficient;

Picture number 2. Example of an Expert Advisor in the PiggyBack_Standard mode:

PiggyBack EA Standard mode

As we can see from image No. 2, the adviser opens two different orders for the use of indicators, the main signal for opening a new pair of orders is the closure of a whole group of orders in profit. So, as when opening a new pair, the distance at which the orders can be closed is extremely important. To adjust it there is a variable Step_Close - this variable indicates the minimum distance in points from the order opening price at which this order can be closed? than it is more - the less aggressive trade will be conducted by the adviser and vice versa. This variable is one of the most important regulators of the aggressiveness of the adviser's trade. In addition, it also provides a variable Step - this is the order step for the restoring grid. In the PiggyBack_Standard mode, this variable must be higher than the value of Step_Close.

For example: We use Lots = 0.01; TrailingStart_Money = 2.0; Step_Close = 250, and Step = 600, and we have a dollar account. This dimension of the variables means that the trailing will be launched when the profit from the order group is 2 USD, but the order will be closed only after 250 points from the opening price. Since the orders are opened in pairs, the losing order will be able to open the recovery only after 600 points from the nearest, so it is important that Step was more than Step_Close so that the adviser did not open unnecessary warrants.

  • PiggyBack_SmartGrids - Trading begins with the opening of two different orders, when the Buy order is closed, an algorithm is launched where the Buy order is opened exactly, and the Sell type order opens only with the accompanying signal from the indicator group. Opening of orders Sell type is made similarly.

Image № 3. Example of the Expert Advisor in the PiggyBack_SmartGrids mode .

PiggyBack EA SmartGrids Mode

The mode of operation of PiggyBack_SmartGrids differs from the PiggyBack_Standard mode in that it is not necessary to open two orders at the time of closing, the advisor determines the current trend and calculates the reversal possibility, that is, it opens either two or only one order when the group is closed. In this Expert Advisor, there is no great need for a strong excess of Step over Step_Grids . After all, the algorithm will open an order only when a signal is received about a possible change in the market trend. This mode of operation provides for the use of technical analysis indicators, so its use is actual on timeseries starting from M15, although it can work on smaller ones, which will increase the activity of trade.

The images of # 2 and # 3 used the same time intervals, as we can see the trading modes demonstrate a high contrast between themselves with identical input settings.

  • Grids_Mode - Lack -grid network system, trade begins with the opening of two different orders, each of which is accompanied by a separate group of grids, when the two groups are closed, two orders are opened again;

Input variables and how their change affects the trade of the advisor.

  • TypeOfWork - Select the mode of the Expert Advisor;
  • Lots - The volume of the first transaction in the order group in lots;
  • Magic - Magic number;
  • Slippage - Allowable slippage in points;
  • MaximumLotsValue - Maximum allowed volume of one order in lots;
  • MaximumSpread - Maximum spread for opening an order;
  • MaximumOrdersInWork - The maximum allowed number of orders opened by the adviser;
  • Order_Comment - Order comment;
  • Long_Trades - Allow purchases;
  • Short_Trades - Allow sales;
  • New_Cycle - after closing, allow new orders to be opened;
  • Overlap_LH - allow the EA to use additional trailing in the money for the highest and lowest orders of the group (separately for Buy and for Sell);

When overlap is used, the first order of the last ( Overlap_LH ) advisor starts an additional trailing on this very top and lowest order from the group, when the first and last orders are closed, the new pair does not open automatically.

Picture №4. Example of overlapping the first order last:

перекрытие ордеров

  • SendMessage - Enable notification of orders closing.
  • Multiplier_Type - Select the type of multiplication of orders of nets;
Choosing the type of order multiplication is one of the important settings of the adversary's aggressiveness. Each subsequent order in the grid can be larger than the previous one by a fixed amount, it can be more than once, and also can be unchanged.
  • Step - Step for grid orders in points;
  • Multiplier - Lot multiplier in Multiplier_lots mode;
  • Add_Lots - Lot increase in the Add_to_lots mode;
  • TakeProfit_Type - Type of take-profit or trailing;
  • TakeProfit_money - Volume of take-profit in money;
  • TrailingStep_money - Trailing step in the deposit currency;
  • TrailingStart_money - Start of the trailing in the deposit currency;
  • Step_Close - The minimum distance from the order to close it;
The less Step_Close , Step and TrailingStart_money ,   the more aggressive the adviser will conduct the trade and vice versa.
  • StopLoss_Type - Select the type of stop-loss;
  • StopLoss_money - The volume of the stop-loss in money;
  • StopOutValue - Volume of stop- loss in money;
Stopout is a total loss from all orders of the adviser on the chart, in case it is more or equal to StopOutValue of deposit units, the adviser will close all his orders. StopLoss_money is a loss on a group of orders, it is measured separately for Buy and for Sell orders, and closes orders accordingly separately in groups.
  • UseTimeOuts - Enable the ban on opening transactions at certain times;
  • Start1 - Beginning of the first time interval allowed for opening new transactions;
  • Stop1 - The end of the first time interval allowed for opening;
  • Start2 - Start of the second time interval allowed for opening new transactions;
  • Stop2 - The end of the second time interval allowed for opening;

If you want to use the Expert Advisor only at strictly defined hours - enable UseTimeOuts , assign time intervals for the work permission, the Expert Advisor will be able to open new orders only at the appointed time intervals.

But the adviser can close the warrant in profit even outside these time intervals.

  • UseNewsFilter - Enable news filter;
  • SourceNews - Choosing a news source;
  • LowNews - Use pauses for news of "low" importance
  • LowIndentBefore - Pause before the news in minutes;
  • LowIndentAfter - Pause after the news in minutes;
  • MidleNews - Use pauses for news of "average" importance
  • MidleIndentBefore - Pause before the news in minutes;
  • MidleIndentAfter - Pause after the news in minutes;
  • HighNews - Use pauses for news of "high" importance
  • HighIndentBefore - Pause before the news in minutes;
  • HighIndentAfter - Pause after the news in minutes;
  • NFPNews - Enabling News Non-farm Payrolls;
  • NFPIndentBefore - Pause before news Non-farm Payrolls in minutes;
  • NFPIndentAfter - Pause after the news Non-farm Payrolls in minutes;
  • Your Time Zone, GMT (for news) - GMT;

If you want to use the news stop trading system - then you should include UseNewsFilter , select a source of news in SourceNews and assign pauses in minutes before and after the news by type. On most economic portals economic news is divided by the type of their importance, this is low, medium and high importance news. You can set pauses for each type of news by relevance. Also, do not forget to specify the time zone of your terminal.

When you work with a news filter, you are only barred from opening new orders, that is, the adviser does not disable the support functions for closing orders during the news.

Attention! To work with the news filter, you need to add the trusted URLs http://www.dailyfx.com/ and http://ec.forexprostools.com/

Link with adviser in mql5.com: https://www.mql5.com/en/market/product/23515

Russian version of this text: https://www.mql5.com/ru/blogs/post/718531


Share it with friends: