Roller strategy basis:
- The EA determines strength and direction of a trend according to number of candles opening prices of which are higher/lower than previous ones (number of candles are represented by candles variable).
- Flat filter: distance from a certain candle to the current candle opening should exceed or be equal to distance parameter in points.
Suppose that candles=4 and distance=30. In that case:
- if opening of candle 0 is higher than opening of candle 1, and
- opening of candle 1 is higher than opening of candle 2, and
- opening of candle 2 is higher than opening of candle 3, and
- opening of candle 3 is higher than opening of candle 4 ====> we have one buy signal (sell conditions are opposite), as this is obviously bullish trend.
It is often the case that such formations are observed in a narrow flat. Here, candles are usually small, and such "stairs" are formed. To avoid opening trades in flat following filter is applied:
Distance between opening price of candle 4 (if candles=4) to the opening of a current candle should exceed or be equal to the distance parameter. In our case distance=30.
So, to open a trade you should meet two abovementioned requirements: a stair made of candles openings and at least 30 point distance from candle opening specified by the candles variable to the current candle opening.
If an order is opened and the price goes in the opposite direction as compared to this order, the EA places an averaging order (you can choose the same lot size or a lot size with a multiplier. Without a multiplier by default).
The EA closes all orders with a total profit if a total number of profit points specified in TakeProfit is reached.
Losses are limited as well: If total number of losses in points specified in MaxLoss is reached, all orders will be closed with this number of losses specified in MaxLoss.
The EA is automatically adjusted for 4 and 5 digits quotes.
Parameters for optimization:
- candles: start: 2, step 1, stop: 8.
- distance: start: 10, step 10, stop: 80.
- Lots are optimized as one wishes.
- TakeProfit: start: 5, step 5, stop: 100.
- MaxLoss: start: 5, step 5, stop: 100.
- Step: start: 5, step 5, stop: 100.
- Multiplier if desired.
- candles: number of subsequent candles, opening of which should be higher/lower than the previous candle opening ("stair");
- distance: distance from opening the last candle of the "stair" to the current candle opening in points;
- MM: enable auto lot;
- MaxRisk: if auto lot is enabled (true), the lot will be calculated basing on free margin in percentage terms.
- Lot: if auto lot is disabled (MM=false), the lot will be as specified in this value.
- TakeProfit: all orders opened by the EA will be closed when the profit in points, specified here, is reached.
- MaxLoss: all orders will be closed when total loss in points is reached.
- Step: If an order is opened and the price goes in the opposite direction, scale-ins in the direction of the initial order opening are performed every Step.
- Multiplier: you can enable a lot multiplier for scaled-in orders. The lot is not multiplied by the previous lot size by default.
- Magic: value for the EA to distinguish its orders.
- Slippage: maximum slippage to open an order.
- name: this value will be specified in comments to each order.
- MaxOrders: maximum number of orders that the EA can open at a time.