The "FracLine" Expert Advisor uses trend lines based on fractals to open a position.
It works at closing prices, so optimization and testing can be performed at open prices.
The time frame and tool can be anything.
Definition of a fractal for this EA:
a fractal is a 9-candlestick pattern, where the central one is the maximum (in an upward movement) or minimum (in a downward movement) in this pattern.
A prerequisite is that to the left and right of the high (fractal candle) there must be at least 4 candles each with a closing price lower than the high (fractal candle)
To open a buy order:
1. the correct position of fractals is determined: up-dn-up;
2. nearest fractal - up;
3. between the first and the second up fractal there are at least 10 candles. (can be changed in the settings.)
3. building a trend line based on fractals. The first point is the second up fractal, the second point is the first up fractal.
(Fractal numbers can be changed in the EA settings.)
4. if the first candlestick closed above the trend line, and the previous candlestick closed below the line, then at the opening of the next candlestick we open a buy order.
To open a sell order, everything is mirrored.