The Expert Advisor uses the strategy of trading the Fibonacci levels. As the basis for placing a grid, the EA uses the ZigZag indicator (included in the standard MetaTrader delivery).
First, the EA determines the trend direction. To do that, according to the Dow theory, it uses the last two Highs and last two Lows of the ZigZag.
- If the last High is higher than the previous and the last Low is higher than the previous, the EA considers the trend to be ascending.
- If the last High is lower than the previous and the last Low is lower than the previous, the EA considers the trend to be descending.
- If the last High is higher (lower) than the previous and the last Low is lower (higher) than the previous, the EA considers the trend to be flat and does not trade.
The message corresponding to the trend evaluation: "Trend is Up", "TRend is Down" or"FLAT"- is displayed in the top left corner.
The Fibonacci grid is built ONLY along the trend. If the price draws a lower Low or High on an uptrend, the EA deletes the grid. Similarly, the EA deletes the grid, is the price draws a higher High or Low on a downtrend.
Once the grid is built, the EA waits for a corrective price movement to intersect one of the levels in the direction opposite to the trend. The bar must close outside the level (cross bar). If the price reverses in the future and one of the subsequent bars closes before the level again (trigger bar), the EA opens a trade in the direction opposite to the breakout, that is, in the trend direction.
The EA uses stop loss and take profit. The stop loss is placed at the user-defined distance after the Low (in case of buying) or High (in case of selling) of the trigger bar. Take profit is set by user as the Fibonacci extension level.
User can also adjust the following parameters:
- ZigZag Depth - parameter of the ZigZag indicator;
- ZigZag Deviation - parameter of the ZigZag indicator;
- ZigZag BackStep - parameter of the ZigZag indicator;
- Trade volume - working lot;
- Stop-loss level (points) - distance from the Low (High) of the trigger bar to the stop loss in points;
- Take profit at FIBO extension - take profit level in the form of the Fibonacci extension;
- Trend precision (points) - the minimum distance between subsequent Highs and subsequent Lows, in which the EA determines the presence of a trend;
- Fibo levels colors - color of the Fibonacci grid levels;