Job finished
![](https://c.mql5.com/i/avatar/avatar_na2.png)
![](https://c.mql5.com/i/avatar/avatar_na2.png)
Specification
Hello,
I want to make a trend trading EA, based on Bollinger Bands.
The EA will trade on one direction only. The rules are.
>> Definition of trend direction
0 - The direction (buy or sell) should be defined in the parameters menu. (add a buy / sell parameter)
1 - Alternatively we could use a 200 (modifiable) Moving Avarage to detect the direction of long term trend. (200 MA parameter, by default, but should be modifiable)
>> ORDERS
If the "buy" direction is set, the EA should open an order when the candle touches the lower band.
If the "sell" direction is set, the EA should open an order when the candle touches the upper band.
- Option on Parameter menu to open order a certain number of pips (negative or positive bellow or above the bands)
>> Take Take Profit should be:
- 1 (dynamic) - a configurable a number of pips (negative or positive) distance from the opposite band.
- 2 (fixed) - Manual number of pips set by the user
>> The StopLoss should be:
- 1 (dynamic) - last 10 days volatility measurement X factor set manually by the user. (I will give you an indicator, or we can average last ten days bollinger bands size)
- 2 (fixed) - set manually by the user.
>> Recovery function, if StopLoss is hit function:
0 - Recovery function turned off
1 - If the order hit the StopLoss, the EA will wait till the first positive candle (in case of a buy) or negative candle (in case of a sell) appear in order to place open a new position. The StopLoss will be the same.
2 - If the order hit the StopLoss, the EA will wait a number of candles defined by the user, to open a new trade. (add the number of candles on parameters menu)
>>Fractal indicator, used as position confirmation:
Like this we could:
0 - Only enter a trade, if candle touches the BB (ignore Fractals)
1 - Only enter a trade, if candle touches the BB AND there is a low fractal (for buy direction) or High fractal (for sell direction) on the last candle, till a certain number of candles defined on the parameter menu.
I imagine this EA shouldn't be hard to code. Maybe someone has it already pre-coded, as Bollinger Band EAs are quite popular.
Please, let me know if you are interested.
Regards,