• Visão global
  • Comentários (1)
  • Discussão (15)

BuySellProf Security

Due to the simultaneous installation of orders for Buy and Sell, the issue of choosing a target is solved - the direction of price movement. According to the law of harmonic oscillations, the price always returns to its original position sooner or later, and the forex market is no exception. Balancing simultaneously multi-directional orders, the expert captures profits at the market reversals, the smaller the initial TP - take profit (take profit) - an application that captures the profit, the more precisely the turn of the market is determined, but the drawdown also increases. Therefore, we need a reasonable choice of the ratio of drawdown, profit and TP, that is easily achieved by testing for the history of trades in the strategy tester for a specific currency pair. The expert is very effective in conditions of high volatility (lack of certainty of the direction of price movement, news output).Risk Manager closes all orders according to the stated drawdown or allowed profit, managing the NumberAccount account.

Monitoring of. The EA configuration is available in my blog.

Operation Description

Enters the market with two orders (Buy and Sell), sets a fixed Take Profit to both of them. After Buy or Sell take profit is triggered, the Expert Advisor places a Buy order if the previous one has been closed on Sell, or a Sell order if the previous one has been closed on Buy considering Martingale, combining both new and previous order's take profits into one (with a special algorithm) and moving it (the take profit) to the possible target point of the price.

Another (balancing) order is opened in the direction opposite to the former two ones with the value equal to the last order (with Martingale) creating the lock with the last order. If volatility exceeds the estimated order take profit, the EA takes the profit repeating the previous operation and considering Martingale till the market reverses or volatility starts decreasing. Stop Loss is placed for the order in case of the market reversal. That Stop Loss can have a fixed value or a Trailing Stop (❷).

After closing all previously placed orders by Take Profit (❶) or by the CurrentPercentProfit (❸) value (they are currently connected by one take profit), the Expert Advisor starts the new trading cycle by placing Buy and Sell orders. The cycle continues till the specified TotalProfitPercentage is reached.

Risk Manager constantly monitors the status of: balance, equity and profit. Displays their values in the chart window of the terminal. When the specified drawdown (PercentLoss) or profit (TotalProfitPercentage) is reached, all orders are closed (both placed manually and automatically) and the EA is removed from the chart. To resume the robot's operation, reattach the EA to the chart and reenter the input parameters.

The drawbacks include selecting parameters on trading history. However, it is reduced by proper configuration of the EA and the balancing order, which adapt the EA to the market conditions.

Input parameters

  • NumberAccount - numerical value of the account number;
  • TotalProfitPercentage - total profit percentage;
  • CurrentPercentProfit - current profit in a cycle;
  • UsePercentLoss - enable/disable the allowable drawdown;
  • PercentLoss - allowable loss percentage (drawdown);
  • TP - Take Profit;
  • SL - Stop Loss;
  • Lots - lot size. The trading robot allows using any lot value which is a multiple of 0.01;
  • Martinlot - multiplier of Lots for reaching a greater profit and breakeven (1 - Martingale is disabled, increases at a step of 0.1, that is 1+0.1=1.1, etc.);
  • MaxLots - maximum allowed lot size (in case the lot size is increased, for example, from 0.01 to 2; all subsequent orders placed by the trading robot will have the size of 2 lots. Martingale will work in the range from 0.01 to 2. This reduces the balance drawdown;
  • Use Trailing Stop - enable/disable trailing stop;
  • Trailing Stop - trailing stop value;
  • MagicNumber - integer constant used to identify orders.

Fallet Willy
Fallet Willy 2018.04.12 09:41 

it's not an EA recovery