This program implements the semi-automated trading mode monitoring the situation for a successful entry into the market. It fixes prerequisites for market entering and opens a buy or a sell orders depending on their type.
After opening an order, the EA maintains it. If the trade is going well, then after a while a certain level of unfixed profit (determined by the program or by the user) will be reached. Once the minimum allowed profit value is reached, the EA sets an order closing level to protect this profit in case the "market goes the wrong way". Reaching a certain profit level, it sets the order closing level. Once these values are set, the order is no longer controlled by the trading robot. The trader gets an open order with unfixed profit and then manages it himself.
If you don't want to keep track of the order (or there is no possibility to do that), then the order will be closed after a while - after the maximum or minimum value of profit is reached. Once an order with unfixed profit is transferred to the trader, the trading robot waits for the next favorable event (signal) to enter the market. Of course, it is possible that after the order is opened the situation changes and, after a while, you can make a prediction that the order cannot reach the desired level to be transferred to the trader.
If the order is in breakeven, it will be closed. If it has unfixed loss, the EA tries to open one or more orders that will bring all the orders to a common breakeven level. After that, all open orders monitored by the program are closed.
The List of Variables
- hedge: 0 - do not use hedging, 1 - use;
- Lot - lot size;
- p_prib - profit level in points to set p_min and p_max;
- p_min - the lower level of profit to fix;
- p_max - the upper level of profit to fix;
- delta - the difference of delta points relative to the last open order;
- min_profit - if several orders are open, the reaching this profit (total of all orders), all orders will be closed;
- n - number of elements in arrays used for working with moving averages;
- WavePeriod - the coefficient of the first moving average;
- AvgPeriod - the coefficient of the second moving average.
Testing on GBPUSD. Timeframe H1. Testing interval: 2004.01.01-2014.08.17.
Version of the test without hedging
- Profit - 2047.11
- Total trades - 683
- Profit factor - 1.25
- Expected Payoff - 3.00
- Drawdown $ - 2973.31
- Drawdown % - 28.24
Version of the test with hedging
- Profit - 1579.37
- Total trades - 1477
- Profit factor - 1.27
- Expected Payoff - 1.07
- Drawdown $ - 1155.87
- Drawdown % - 10.89
The program performed well on various trading pairs after optimization for the selected financial instrument. Giving here a full description of the Torsion algorithm is impossible, since it would exceed the maximum allowed 3600 characters. The algorithm is generally similar to the algorithm of its predecessor described here https://www.mql5.com/en/market/product/4299.