The indicator searches for the PriceAction pattern Rails (Rails).
The pattern consists of two adjacent multidirectional bars. The opening and closing prices of two adjacent bars included in this pattern should be close to each other. It is desirable that the shadows of the candles are small.
For a bearish pattern (the right candle of the bearish pattern), a pending SellStop order is placed just below the minimum of the pattern. The initial stop is placed just above the maximum of the pattern. For a bullish pattern (the right candle of the bullish pattern) – mirror image.
It should be borne in mind that often (in about 80% of cases) the price after the formation of the pattern rolls back in the direction of the initial stop. The rollback can be quite significant. But, as long as the rollback does not exceed 50% of the height of the pattern, it is considered working. If this level is exceeded, it is better to withdraw the order, even with a small loss, and look for opportunities to enter later.
The indicator has three configurable parameters:
- Shift between the opening and closing prices – the offset between the closing and opening prices of the bars in the pattern. 0.1 = 10% of the pattern value.
- Relative size of the pattern – the relative size of the pattern. The smaller the value, the smaller the size of the candlesticks in the pattern will be included in the search.
- ATR’s period for calculate relative candle size – the ATR period used to calculate the relative size of candles in patterns.