• 概述
  • 评论
  • 评论 (21)
  • 新特性

Exp TwoSides

An Expert Advisor based on the "Two sides of he martingale" strategy. Martingale is a betting management system. This type of strategy is very popular in roulette. This principle is also widely used in Forex. After starting the EA we open two opposite deals - BUY and SELL. The initial stop loss should be equal to the take profit. For example: StopLoss = 100, TakeProfit = 100.

In this case, when stop loss triggers on one order, we get the activation of take profit on the second one. Thus the result is 0. Then the next series of deals is opened, but on the following condition. The volume of the next deal of the same type is equal to Lot * martingale. And then we cover the loss of the first deal and earn a profit of 100 points. On the example of the Expert Advisor:

1 2013.01.02 09:00 buy 1 0.10 1.32716 1.32616 1.32816
2 2013.01.02 09:00 sell 2 0.10 1.32712 1.32812 1.32612
3 2013.01.02 09:03 s/l 2 0.10 1.32812 1.32812 1.32612 -10.00 9990.00
60 2013.01.02 09:03 t/p 1 0.10 1.32816 1.32616 1.32816 10.00 10000.00
5 2013.01.02 09:03 buy 3 0.10 1.32820 1.32720 1.32920
6 2013.01.02 09:03 sell 60 0.20 1.32816 1.32916 1.32716
7 2013.01.02 09:06 s/l 3 0.10 1.32720 1.32720 1.32920 -10.00 9990.00
8 2013.01.02 09:06 t/p 60 0.20 1.32716 1.32916 1.32716 20.00 10010.00


Parameters

  • Magic - magic number.
  • StopLoss - the stop loss value, 0 - not used.
  • TakeProfit - the take profit value, 0 - not used
  • Slippage - slippage
  • MarketWatch - trading mode. If MarketWatch = true, first positions/orders without stops are placed, and then they are modified (for some brokers).
  • Lots - fixed lot.
  • Martin - the martingale coefficient for the deal following the losing one. If 1, then it is not used.
  • MaxSpreadToNotTrade - maximum spread filter for opening trades.
  • MinSpreadToNotTrade - minimum spread filter for opening trades.
  • MaxOrders = maximum number of legs (trades) in one series in one series.
  • AdjustTP - adjustment of the take profit in points.
  • AdjustAfter - the number of the leg, after which the take profit will be increased\decreased by AdjustTP points.
  • StopDayTradingEaAfterTP - stop the EA operation after reaching take profit in the current day. The EA starts trading the next day only.
  • TrailingStopUSE - use trailing stop.
  • IfProfTrail - use the breakeven mode only for profitable positions.
  • TrailingStop - trailing distance, 0 - the minimum allowed.
  • TrailingStep - trailing step.
无评论
版本 17.208 - 2017.02.20
Global update 2017

- Added parameter
MaxSpreadToNotTrade and MinSpreadToNotTrade
MaxSpreadToNotTrade - Maximum spread, at which the EA can open a trade
MinSpreadToNotTrade - Minimum spread, at which the EA can open a trade

- Added the EAPADPRO information panel
Details on the panel in our blog: http://www.expforex.com/publ/eapadpro_novyj_sovremennyj_informacionnyj_blok_dlja_nashikh_ehkspertov/6-1-0-153
or https://www.mql5.com/ru/blogs/post/687140
The strategy block includes the following variables:
Current loss in the grid for the BUY SELL directions
current number of the BUY SELL leg
Current lot of BUY SELL - if there are insufficient funds for the next lot, the EA will output NoMoney

- Added the AdjustTP and AdjustAfter parameters
AdjustTP - adjust the take profit when opening pending orders.
AdjustAfter - number of the left after which the adjustment will be applied.
Once the EA places AdjustAfter amount of orders, the take profit of the next trade will be increased by AdjustTP * (NumberOfLegs - AdjustAfter) points.

When positions are closed by stop loss, the loss includes not only the stop loss level, but also the spread, especially if it is floating.
In order to achieve the take profit that can cover all previous stop losses, it is necessary to increase the take profit of each new pending order.
This feature allows doing that.

- Added parameter
MaxOrders - the maximum number of positions in 1 direction
If MaxOrders=5, and 5th position (for example) in the current grid in one direction closed in a loss, then the next leg will be opened with the initial lot, and the grid will start working from the new position.

StopDayTradingEaAfterTP - if the last position closed by take profit (separate for BUY SELL directions), the EA stops its operation until the next day (separate for BUY SELL directions)
版本 16.729 - 2016.08.03
The Expert Advisor has been compiled in the latest terminal build.