Hi,
I have created an indicator that has integer values:
Uploaded with
ImageShack.usI need to code a pattern that could be described a 2-1-2 pattern.
I have marked it in the picture above.
On the first look the pattern is quite simple, it´s rules are:
1. the indicator is >= +2.
2. the indicator drops to -1.
3. the indicator climbs to >= +2.
However, the indicator can move sideways for indefinite amount of bars. These sideways moves must be ignored.
Example with numbers:
bar - indicator
1 - 5
2 - 5
3 - 5
4 - -1
5 - -1
6 - 1
7 - 1
8 - 1
9 - 3
This should be detected as the described pattern.
My problem is the indefinite length of the pattern. I cannot figure out how to overcome this.
Anyone any ideas?
dansmo