37 private int _patternIndex;
38 private int _patternResult;
62 get {
return Samples >=
Period; }
79 if (window[1].
High < window[2].
High && window[1].
Low > window[2].
Low &&
81 ((input.
High < window[1].High && input.
Low < window[1].Low)
84 (input.
High > window[1].High && input.
Low > window[1].Low)
88 _patternResult = (input.
High < window[1].High ? 1 : -1);
89 _patternIndex = (int)Samples - 1;
93 if (Samples <= _patternIndex + 4 &&
95 ((_patternResult > 0 && input.
Close > window[(
int)Samples - _patternIndex].High)
98 (_patternResult < 0 && input.
Close < window[(int)Samples - _patternIndex].
Low)
109 if (window[1].
High < window[2].
High && window[1].
Low > window[2].
Low &&
111 ((input.
High < window[1].High && input.
Low < window[1].Low)
114 (input.
High > window[1].High && input.
Low > window[1].Low)
118 _patternResult = (input.
High < window[1].High ? 1 : -1);
119 _patternIndex = (int) Samples - 1;
120 value = _patternResult;
125 if (Samples <= _patternIndex + 4 &&
127 ((_patternResult > 0 && input.
Close > window[(
int) Samples - _patternIndex].High)
130 (_patternResult < 0 && input.
Close < window[(
int) Samples - _patternIndex].Low)
134 value = _patternResult + (_patternResult > 0 ? 1 : -1);