Find Pattern Rails
The indicator searches for the Rails PriceAction pattern.
The pattern consists of two adjacent oppositely directed bars. Open and Close prices of the two adjacent bars included in the pattern should be located close to each other. It is desirable that the candlestick shadows are small enough.
For the bearish pattern (the pattern's right candle is a bearish one), SellStop pending order is placed slightly below the pattern's Low. The initial stop is placed slightly above the pattern's High. For the bullish pattern (the pattern's right candle is a bullish one), the case is the same in inverse manner.
Please remember that the price rolls back in the direction of the initial stop after the pattern is formed quite often (in about 80% of cases). The rollback can be quite significant. However, till the rollback does not exceed 50% of the pattern's height, it is considered to be valid. If this level is exceeded, it would be better to remove the order even if it has a small loss and look for market entry opportunities later.
The indicator has three configured parameters:
- Shift between the opening and closing prices - shift between bar Open and Close prices in the pattern. 0.1 = 10% of the pattern value.
- Relative size of the pattern. The lower the value, the lower the sizes of the pattern candles included in the search.
- ATR`s period for calculate relative candle size - ATR period for calculating the relativity of candlestick sizes in the patterns.
Fixed checking of the available history.