Both BUY and SELL positions are opened by this Expert Advisor in a hedging mechanism to minimize risk and enhance profitability.
When the Expert Advisor starts, and there are no open positions, it immediately opens a BUY and a SELL order at market. The Expert Advisor divides the price into four market zones as follows:
1. Zone zero – The initial zone when there are no open positions.
2. Zone 1 – This zone lies between the entry price of the initial open positions and a band of ORDER_SPACE points.
3. Zone 2 – This zone lies above Zone 1.
4. Zone 3 – This zone lies below Zone 1.
After the initial trades (both BUY and SELL) are placed, the Expert Advisor checks for conditions to add a Martingale position, and similarly for exit conditions.
When the price falls into Zone 2 or Zone 3, the Expert Advisor opens a SELL trade, or a BUY trade respectively. Each trade is opened at a distance of ORDER_SPACE from its previous order.
It opens up to 12 orders in each direction in a Martingale series and the lot-sizes are increased proportionately in the following sequence of 3, 6, 12, 24, 48, 96, 192, 384, 768, 1536 and 3072. So, if the first lot-size is 0.1 lots, then the final (12th) lot-size will be 307.2 lots.
When the total profit of all the positions combined is greater than zero, then all the positions are closed.