42 private readonly
int _nearAveragePeriod;
44 private decimal _nearPeriodTotal;
46 private int _patternIndex;
47 private int _patternResult;
63 : this(
"HIKKAKEMODIFIED")
72 get {
return Samples >=
Period; }
85 if (Samples >=
Period - _nearAveragePeriod - 3 && Samples <
Period - 3)
90 else if (Samples >=
Period - 3)
94 if (window[2].
High < window[3].
High && window[2].
Low > window[3].
Low &&
96 window[1].
High < window[2].
High && window[1].
Low > window[2].
Low &&
98 ((input.
High < window[1].High && input.
Low < window[1].Low &&
104 (input.
High > window[1].High && input.
Low > window[1].Low &&
111 _patternResult = (input.
High < window[1].High ? 1 : -1);
112 _patternIndex = (int) Samples - 1;
117 if (Samples <= _patternIndex + 4 &&
119 ((_patternResult > 0 && input.
Close > window[(
int) Samples - _patternIndex].High)
122 (_patternResult < 0 && input.
Close < window[(int) Samples - _patternIndex].
Low))
139 if (window[2].
High < window[3].
High && window[2].
Low > window[3].
Low &&
141 window[1].
High < window[2].
High && window[1].
Low > window[2].
Low &&
143 ((input.
High < window[1].High && input.
Low < window[1].Low &&
149 (input.
High > window[1].High && input.
Low > window[1].Low &&
156 _patternResult = (input.
High < window[1].High ? 1 : -1);
157 _patternIndex = (int) Samples - 1;
158 value = _patternResult;
163 if (Samples <= _patternIndex + 4 &&
165 ((_patternResult > 0 && input.
Close > window[(
int)Samples - _patternIndex].High)
168 (_patternResult < 0 && input.
Close < window[(int)Samples - _patternIndex].
Low))
171 value = _patternResult + (_patternResult > 0 ? 1 : -1);
192 _nearPeriodTotal = 0;