only deals with dollar values. No pip values are used to avoid "Point" issues.
The "SAFETY NET" has been added since Version 1.3 to avoid big losses due to big drawdowns.
-- The external variable "maxcount" has been removed. There are at most three orders outstanding at any time.
This EA works in any timeframe for any currency pair, including gold and silver. Its logic is based on the fact that any price movement may accompany rebound. It opens orders in both directions (BUY & SELL) at a time initially, then closes one of them at the specified profit "dollar_profit" (in dollars per lot) and opens one order in reverse direction. Meanwhile accumulated (unrealized) loss is greater than the profit made, but when price moves back, loss decreases or turns to profit.
It closes all the outstanding orders when the specified profit "sessionTP" (in dollars per lot) is reached, which functions as TAKEPROFIT.
The opening of the initilal orders through the closure of all outstanding orders constitutes one "session".
Preferred currency pairs are: EUR/USD, GBP/USD, and USD/CHF.
To avoid big drawdowns, use the "SAFETY NET".
In fact, if we use this EA for several pairs at the same time with small lots allocated to each of them, we can make profits quite stably when we use the "SAFETY NET".
If you set "use_safety_mode" = false, this EA functions just like older versions.
If you set "use_safety_mode" = true (default), the "SAFETY NET" is used. An additional order (called "safety order") is opened in the direction opposite to the remaining two orders when the loss amounts to "safety_start" (in dollars per lot). This safety order is closed when "safety_profit" (in dollars per lot) specific to each safety order is reached to increase profit during drawdown period to offset the accumulated loss (approx. 40% with preset values -- safety_profit /safety_step=1300/3000). Another safety order is opened when "safety_step" (in dollars per lot) is reached from the former safety order, and so on. Meanwhile, when the price goes back and "safety_modeTP " (dollars per lot) is reached, all outstanding orders are closed and the session concludes itself. Because profit has been accumulated during drawdown period, the loss may be minimized and profitability be improved. Once the "SAFETY NET" is entered, the profit which would be made may be reduced, though. If we are lucky enough, the "SAFETY NET" is not entered and the original intended profit can be made.