Use pending orders for TradeBuilderMT5

29 October 2018, 00:44
Sergey Deev
0
83

The TradeBuilderMT5 Expert Advisor is designed to build a trading system based on an arbitrary set of technical MT5 indicators.

Previous article: Using technical indicators in the TradeBuilderMT5 Expert Advisor

Version 1.5 of the advisor can work with pending orders. The orderTypes parameter allows you to select the type of opened orders (MarketOrders-market, StopOrders-pending orders BUYSTOP and SELLSTOP, LimitOrders-pending orders BUYLIMIT and SELLLIMIT).

The following example implements the strategy on the Bill Williams indicators - Alligator and Fractal.

Conditions for placing a stop order to buy:

  • the Teeth Alligator line is above the Jaws line;
  • the Lips line crosses the Teeth line from top to bottom;
  • over the next 6 candles, the upper fractal is formed and the fractal candle is located above the Lips line;
  • a BUYSTOP order is placed at the fractal level;
  • A pending order is deleted if the Lips line goes below the Jaw line.

Conditions for placing a stop order for sale:

  • the Teeth Alligator line is below the Jaws line;
  • Lips line crosses Teeth line from bottom to top;
  • in the next 6 candles a lower fractal is formed and the fractal candle is below the Lips line;
  • set SELLSTOP order at the fractal level;
  • A pending order is deleted if the Lips line goes above the Jaw line.

Next, we consider the settings of the TradeBuilderMT5 advisor for the implementation of this strategy. The numbers on the screenshots indicate:

  1. ALLIGATOR indicator selected
  2. current TF
  3. empty action
  4. parameter string
  5. last closed bar
  6. jaws line
  7. excess check
  8. Teeth line
  9. check crossing down
  10. line Lips
  11. delaying the state by 6 bars
  12. line Lips
  13. Low price
  14. excess check
  15. bar 2
  16. FRACTAL indicator
  17. not empty
  18. bar 2
  19. upper fractal

Settings for pending order delete signal:

  1. Jaws Alligator line
  2. below
  3. line Lips Alligator


Sample video


Set-file is attached

Files:
Share it with friends: