Since I believe the trap is a clue element of a formation pattern, my algorithm distinguishes various breakout scenarios and calculates the expectation using only the statistics on a particular scenario. A formation pattern is made by 5 reversal points (ABCDE). Depending on the presence or absence of the traps, there are 8 possible breakout scenarios.
Possible breakout lines:
- L(evel): horizontal level.
- F(loating): “channel” line, goes from D parallel CE. Makes sense only when E < C.