forked from tconsky/ChanlunX
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBi.cpp
690 lines (652 loc) · 17.8 KB
/
Bi.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
#include "BaoHan.h"
#include "Bi.h"
// 从fromIndex到toIndex,最后一个值是最低的
int LastIsMin(float *pLow, int fromIndex, int toIndex) {
for (int i = fromIndex; i < toIndex; i++) {
if (pLow[i] < pLow[toIndex]) {
return 0;
}
}
return 1;
}
// 从fromIndex到toIndex,最后一个值是最高的
int LastIsMax(float *pHigh, int fromIndex, int toIndex) {
for (int i = fromIndex; i < toIndex; i++) {
if (pHigh[i] > pHigh[toIndex]) {
return 0;
}
}
return 1;
}
// 计算底分型中间K线区间高
float RangeHign(float *pOutHigh, int nLastD) {
for (int i = nLastD - 1; i >= 0; i--) {
if (pOutHigh[i] > pOutHigh[nLastD]) {
return pOutHigh[i];
}
}
return pOutHigh[0];
}
// 计算顶分型中间K线区间低
float RangeLow(float *pOutLow, int nLastG) {
for (int i = nLastG - 1; i >= 0; i--) {
if (pOutLow[i] < pOutLow[nLastG]) {
return pOutLow[i];
}
}
return pOutLow[0];
}
// 反向跳空
int IsReverseJump(int i, int nState, int nLastD, int nLastG, float *pHigh,
float *pLow) {
if (nState == 1) {
if (pHigh[i] < pLow[nLastD]) {
if (i > nLastG && pHigh[i] < pLow[i - 1]) {
return 1;
}
}
} else if (nState == -1) {
if (pLow[i] > pHigh[nLastG]) {
if (i > nLastD && pLow[i] > pHigh[i - 1]) {
return 1;
}
}
}
return 0;
}
// 从index往前找低点坐标
int GetLastDIndex(int index, float *pSig) {
for (int x = index; x >= 0; x--) {
if (pSig[x] == -1) {
return x;
}
}
return -1;
}
// 从index往前找高点坐标
int GetLastGIndex(int index, float *pSig) {
for (int x = index; x >= 0; x--) {
if (pSig[x] == 1) {
return x;
}
}
return -1;
}
// 比较强势的上涨或者下跌也成笔
int IsStrongMove(int i, int nState, int nLastD, int nLastG, float *pHigh,
float *pLow, float* pSig) {
if (nState == 1) {
if (pLow[i] < pLow[nLastD]) {
int g1 = GetLastGIndex(i, pSig);
int g2 = GetLastGIndex(g1 - 1, pSig);
if (g1 >= 0 && g2 >= 0 && pHigh[g1] > pHigh[g2] && i - g1 >= 4) {
return 1;
}
}
} else if (nState == -1) {
if (pHigh[i] > pHigh[nLastG]) {
int d1 = GetLastDIndex(i, pSig);
int d2 = GetLastDIndex(d1 - 1, pSig);
if (d1 >= 0 && d2 >= 0 && pLow[d1] < pLow[d2] && i - d1 >= 4) {
return 1;
}
}
}
return 0;
}
bool HasTempBi(int nState, int nCount, int i, float *pHigh, float *pLow,
float *pInclude, float *pOutHigh, float *pOutLow) {
int kCount = 1;
if (nState == 1) // 找向上笔
{
for (int x = i; x < nCount; x++) {
if (pLow[x] < pLow[i]) {
return false;
} else {
if (pInclude[x] == 0) {
kCount++;
}
if (kCount >= 5 && LastIsMax(pHigh, i, x)
&& pOutHigh[x] > pOutHigh[i]) {
return true;
}
}
}
} else if (nState == -1) // 找向下笔
{
for (int x = i; x < nCount; x++) {
if (pHigh[x] > pHigh[i]) {
return false;
} else {
if (pInclude[x] == 0) {
kCount++;
}
if (kCount >= 5 && LastIsMin(pLow, i, x)
&& pOutLow[x] < pOutLow[i]) {
return true;
}
}
}
}
return true;
}
void Bi0(int nCount, float *pOut, float *pIn, float *pHigh, float *pLow) {
float *pDirection = new float[nCount];
float *pOutHigh = new float[nCount];
float *pOutLow = new float[nCount];
float *pInclude = new float[nCount];
BaoHan(nCount, pDirection, pOutHigh, pOutLow, pInclude, pHigh, pLow);
pOut[0] = -1; // -1表示笔底,1表示笔顶,初始化是第一根K线认为是一个底。
int nState = -1; // -1表示向下笔中,1表示向上笔中,初始化时候认为是向下笔的延续中
int nLastD = 0; // 底位置
int nLastG = -1; // 顶位置,初始化没有顶
int kCountDown = 5; // 计数K线数量,初始值假设已经向下笔第五根K线
int kCountUp = 1;
for (int i = 1; i < nCount; i++) {
if (nState == -1) {
// 向下笔中遇到K线出新低,底就要移到新低这里,这里不需要管K线的方向。
if (pLow[i] < pLow[nLastD]) {
pOut[nLastD] = 0;
nLastD = i;
pOut[nLastD] = -1;
kCountUp = 1;
}
// 向下笔中遇到K线不出新低。
else {
if (pInclude[i] == 0) {
if (pDirection[i] == 1) {
kCountUp++;
} else {
if (pOutHigh[i] > RangeHign(pOutHigh, nLastD)) {
kCountUp++;
} else {
kCountUp = 1;
}
}
}
if ((kCountUp >= 5
|| IsStrongMove(i, nState, nLastD, nLastG, pHigh, pLow,
pOut)
|| IsReverseJump(i, nState, nLastD, nLastG, pHigh, pLow))
&& LastIsMax(pHigh, nLastD, i)) {
nState = 1;
nLastG = i;
pOut[nLastG] = 1;
kCountDown = 1;
}
}
} else if (nState == 1) {
// 向上笔中遇到K线出新高,顶就要移到新高这里,这里不需要管K线的方向。
if (pHigh[i] > pHigh[nLastG]) {
pOut[nLastG] = 0;
nLastG = i;
pOut[nLastG] = 1;
kCountDown = 1;
}
// 向上笔中遇到K线不出新高。
else {
if (pInclude[i] == 0) {
if (pDirection[i] == -1) {
kCountDown++;
} else {
if (pOutLow[i] < RangeLow(pOutLow, nLastG)) {
kCountDown++;
} else {
kCountDown = 1;
}
}
}
if ((kCountDown >= 5
|| IsStrongMove(i, nState, nLastD, nLastG, pHigh, pLow,
pOut)
|| IsReverseJump(i, nState, nLastD, nLastG, pHigh, pLow))
&& LastIsMin(pLow, nLastG, i)) {
// 转向到向下笔状态
nState = -1;
nLastD = i;
pOut[nLastD] = -1;
kCountUp = 1;
}
}
}
// 向下笔中有高点大于前高,前高要调整。
// 向上笔中有低点小于前低,低点要调整。
while (pOut[i] == -1 || pOut[i] == 1) {
if (pOut[i] == -1) {
// 中间如果有更高的K线,前面的顶要移到更高K线那里
int IsLastGMoved = 0;
int nTemp = 0;
if (nLastG >= 0) {
nTemp = nLastG + 1;
while (nTemp <= i) {
if (pHigh[nTemp] > pHigh[nLastG]) {
IsLastGMoved = 1;
break;
}
nTemp++;
}
}
if (IsLastGMoved == 1) {
pOut[nLastG] = 0; // 消掉原来顶
nLastG = nTemp;
pOut[nLastD] = 0;
pOut[nLastG] = 1; // 顶后移
nLastD = GetLastDIndex(nLastG, pOut); // 底归位
i = nLastG; // 从新的顶重新开始计算
kCountDown = 1; // 向下K线数量归位
nState = 1;
} else {
break;
}
} else if (pOut[i] == 1) {
// 中间如果有更低的K线,前面的底要移到更低K线那里
int IsLastDMoved = 0;
int nTemp = 0;
if (nLastD >= 0) {
nTemp = nLastD + 1;
while (nTemp <= i) {
if (pLow[nTemp] < pLow[nLastD]) {
IsLastDMoved = 1;
break;
}
nTemp++;
}
}
if (IsLastDMoved == 1) {
pOut[nLastD] = 0; // 消掉原来底
nLastD = nTemp;
pOut[nLastG] = 0;
pOut[nLastD] = -1; // 底后移
nLastG = GetLastGIndex(nLastD, pOut); // 底归位
i = nLastD; // 从新的顶重新开始计算
kCountUp = 1; // 向上K线数量归位
nState = -1;
} else {
break;
}
}
}
}
delete[] pDirection;
delete[] pOutHigh;
delete[] pOutLow;
delete[] pInclude;
}
void Bi1(int nCount, float *pOut, float *pIn, float *pHigh, float *pLow) {
CIniReader iniReader(".\\T0002\\dlls\\ChanlunX.ini");
int iFenXingQuJian = iniReader.ReadInteger("PeiZhi", "FenXingQuJian", 2);
float *pDirection = new float[nCount];
float *pOutHigh = new float[nCount];
float *pOutLow = new float[nCount];
float *pInclude = new float[nCount];
BaoHan(nCount, pDirection, pOutHigh, pOutLow, pInclude, pHigh, pLow);
pOut[0] = -1; // -1表示笔底,1表示笔顶,初始化是第一根K线认为是一个底。
int nState = -1; // -1表示向下笔中,1表示向上笔中,初始化时候认为是向下笔的延续中
int nLastD = 0; // 底位置
int nLastG = -1; // 顶位置,初始化没有顶
int kCountDown = 5; // 计数K线数量,初始值假设已经向下笔第五根K线
int kCountDownRaw = 5;
int kCountUp = 1;
int kCountUpRaw = 1;
for (int i = 1; i < nCount; i++) {
if (nState == -1) {
// 向下笔中遇到K线出新低,底就要移到新低这里,这里不需要管K线的方向。
if (pLow[i] < pLow[nLastD]) {
pOut[nLastD] = 0;
nLastD = i;
pOut[nLastD] = -1;
kCountUp = 1;
kCountUpRaw = 1;
}
// 向下笔中遇到K线不出新低。
else {
if (pInclude[i] == 0) {
kCountUp++;
}
kCountUpRaw++;
if (((kCountUp >= 4 && kCountUpRaw >= 5)
|| IsStrongMove(i, nState, nLastD, nLastG, pHigh, pLow,
pOut)
|| IsReverseJump(i, nState, nLastD, nLastG, pHigh, pLow))
&& LastIsMax(pHigh, nLastD, i)
&& (iFenXingQuJian == 1 ?
pOutHigh[i] > RangeHign(pOutHigh, nLastD) :
pOutHigh[i] > pOutHigh[nLastD])) {
nState = 1;
nLastG = i;
pOut[nLastG] = 1;
kCountDown = 1;
kCountDownRaw = 1;
}
}
} else if (nState == 1) {
// 向上笔中遇到K线出新高,顶就要移到新高这里,这里不需要管K线的方向。
if (pHigh[i] > pHigh[nLastG]) {
pOut[nLastG] = 0;
nLastG = i;
pOut[nLastG] = 1;
kCountDown = 1;
kCountDownRaw = 1;
}
// 向上笔中遇到K线不出新高。
else {
if (pInclude[i] == 0) {
kCountDown++;
}
kCountDownRaw++;
if (((kCountDown >= 4 && kCountDownRaw >= 5)
|| IsStrongMove(i, nState, nLastD, nLastG, pHigh, pLow,
pOut)
|| IsReverseJump(i, nState, nLastD, nLastG, pHigh, pLow))
&& LastIsMin(pLow, nLastG, i)
&& (iFenXingQuJian == 1 ?
pOutLow[i] < RangeLow(pOutLow, nLastG) :
pOutLow[i] < pOutLow[nLastG])) {
// 转向到向下笔状态
nState = -1;
nLastD = i;
pOut[nLastD] = -1;
kCountUp = 1;
kCountUpRaw = 1;
}
}
}
// 向下笔中有高点大于前高,前高要调整。
// 向上笔中有低点小于前低,低点要调整。
while (pOut[i] == -1 || pOut[i] == 1) {
if (pOut[i] == -1) {
// 中间如果有更高的K线,前面的顶要移到更高K线那里
int IsLastGMoved = 0;
int nTemp = 0;
if (nLastG >= 0) {
nTemp = nLastG + 1;
while (nTemp <= i) {
if (pHigh[nTemp] > pHigh[nLastG]) {
IsLastGMoved = 1;
break;
}
nTemp++;
}
}
if (IsLastGMoved == 1) {
pOut[nLastG] = 0; // 消掉原来顶
nLastG = nTemp;
pOut[nLastD] = 0;
pOut[nLastG] = 1; // 顶后移
nLastD = GetLastDIndex(nLastG, pOut); // 底归位
i = nLastG; // 从新的顶重新开始计算
kCountDown = 1; // 向下K线数量归位
kCountDownRaw = 1;
nState = 1;
} else {
break;
}
} else if (pOut[i] == 1) {
// 中间如果有更低的K线,前面的底要移到更低K线那里
int IsLastDMoved = 0;
int nTemp = 0;
if (nLastD >= 0) {
nTemp = nLastD + 1;
while (nTemp <= i) {
if (pLow[nTemp] < pLow[nLastD]) {
IsLastDMoved = 1;
break;
}
nTemp++;
}
}
if (IsLastDMoved == 1) {
pOut[nLastD] = 0; // 消掉原来底
nLastD = nTemp;
pOut[nLastG] = 0;
pOut[nLastD] = -1; // 底后移
nLastG = GetLastGIndex(nLastD, pOut); // 底归位
i = nLastD; // 从新的顶重新开始计算
kCountUp = 1; // 向上K线数量归位
kCountUpRaw = 1;
nState = -1;
} else {
break;
}
}
}
}
delete[] pDirection;
delete[] pOutHigh;
delete[] pOutLow;
delete[] pInclude;
}
void Bi2(int nCount, float *pOut, float *pIn, float *pHigh, float *pLow) {
CIniReader iniReader(".\\T0002\\dlls\\ChanlunX.ini");
int iFenXingQuJian = iniReader.ReadInteger("PeiZhi", "FenXingQuJian", 2);
float *pDirection = new float[nCount];
float *pOutHigh = new float[nCount];
float *pOutLow = new float[nCount];
float *pInclude = new float[nCount];
BaoHan(nCount, pDirection, pOutHigh, pOutLow, pInclude, pHigh, pLow);
pOut[0] = -1; // -1表示笔底,1表示笔顶,初始化是第一根K线认为是一个底。
int nState = -1; // -1表示向下笔中,1表示向上笔中,初始化时候认为是向下笔的延续中
int nLastD = 0; // 底位置
int nLastG = -1; // 顶位置,初始化没有顶
int kCountDown = 5; // 计数K线数量,初始值假设已经向下笔第五根K线
int kCountUp = 1;
for (int i = 1; i < nCount; i++) {
if (nState == -1) {
// 向下笔中遇到K线出新低,底就要移到新低这里,这里不需要管K线的方向。
if (pLow[i] < pLow[nLastD]) {
pOut[nLastD] = 0;
nLastD = i;
pOut[nLastD] = -1;
kCountUp = 1;
}
// 向下笔中遇到K线不出新低。
else {
if (pInclude[i] == 0) {
kCountUp++;
}
if ((kCountUp >= 5
|| IsStrongMove(i, nState, nLastD, nLastG, pHigh, pLow,
pOut)
|| IsReverseJump(i, nState, nLastD, nLastG, pHigh, pLow))
&& LastIsMax(pHigh, nLastD, i)
&& (iFenXingQuJian == 1 ?
pOutHigh[i] > RangeHign(pOutHigh, nLastD) :
pOutHigh[i] > pOutHigh[nLastD])) {
nState = 1;
nLastG = i;
pOut[nLastG] = 1;
kCountDown = 1;
} else {
int d1 = GetLastDIndex(i, pOut);
int d2 = GetLastDIndex(d1 - 1, pOut);
int g1 = GetLastGIndex(i, pOut);
if (d1 >= 0 && d2 >= 0 && g1 >= 0 && g1 < d1 && d2 < g1
&& pLow[d1] > pLow[d2] && pHigh[i] > pHigh[g1]
&& HasTempBi(nState, nCount, i, pHigh, pLow,
pInclude, pOutHigh, pOutLow)) {
pOut[d1] = 0;
pOut[g1] = 0;
nState = 1;
nLastG = i;
pOut[nLastG] = 1;
kCountDown = 1;
} else {
pOut[i] = 0;
}
}
}
} else if (nState == 1) {
// 向上笔中遇到K线出新高,顶就要移到新高这里,这里不需要管K线的方向。
if (pHigh[i] > pHigh[nLastG]) {
pOut[nLastG] = 0;
nLastG = i;
pOut[nLastG] = 1;
kCountDown = 1;
}
// 向上笔中遇到K线不出新高。
else {
if (pInclude[i] == 0) {
kCountDown++;
}
if ((kCountDown >= 5
|| IsStrongMove(i, nState, nLastD, nLastG, pHigh, pLow,
pOut)
|| IsReverseJump(i, nState, nLastD, nLastG, pHigh, pLow))
&& LastIsMin(pLow, nLastG, i)
&& (iFenXingQuJian == 1 ?
pOutLow[i] < RangeLow(pOutLow, nLastG) :
pOutLow[i] < pOutLow[nLastG])) {
// 转向到向下笔状态
nState = -1;
nLastD = i;
pOut[nLastD] = -1;
kCountUp = 1;
} else {
int g1 = GetLastGIndex(i, pOut);
int g2 = GetLastGIndex(g1 - 1, pOut);
int d1 = GetLastDIndex(i, pOut);
if (g1 >= 0 && g2 >= 0 && d1 >= 0 && d1 < g1 && g2 < d1
&& pHigh[g1] < pHigh[g2] && pLow[i] < pLow[d1]
&& HasTempBi(nState, nCount, i, pHigh, pLow,
pInclude, pOutHigh, pOutLow)) {
pOut[g1] = 0;
pOut[d1] = 0;
nState = -1;
nLastD = i;
pOut[nLastD] = -1;
kCountUp = 1;
} else {
pOut[i] = 0;
}
}
}
}
// 向下笔中有高点大于前高,前高要调整。
// 向上笔中有低点小于前低,低点要调整。
while (pOut[i] == -1 || pOut[i] == 1) {
if (pOut[i] == -1) {
// 中间如果有更高的K线,前面的顶要移到更高K线那里
int IsLastGMoved = 0;
int nTemp = 0;
if (nLastG >= 0) {
nTemp = nLastG + 1;
while (nTemp <= i) {
if (pHigh[nTemp] > pHigh[nLastG]) {
IsLastGMoved = 1;
break;
}
nTemp++;
}
}
if (IsLastGMoved == 1) {
pOut[nLastG] = 0; // 消掉原来顶
nLastG = nTemp;
pOut[nLastD] = 0;
pOut[nLastG] = 1; // 顶后移
nLastD = GetLastDIndex(nLastG, pOut); // 底归位
i = nLastG; // 从新的顶重新开始计算
kCountDown = 1; // 向下K线数量归位
nState = 1;
} else {
break;
}
} else if (pOut[i] == 1) {
// 中间如果有更低的K线,前面的底要移到更低K线那里
int IsLastDMoved = 0;
int nTemp = 0;
if (nLastD >= 0) {
nTemp = nLastD + 1;
while (nTemp <= i) {
if (pLow[nTemp] < pLow[nLastD]) {
IsLastDMoved = 1;
break;
}
nTemp++;
}
}
if (IsLastDMoved == 1) {
pOut[nLastD] = 0; // 消掉原来底
nLastD = nTemp;
pOut[nLastG] = 0;
pOut[nLastD] = -1; // 底后移
nLastG = GetLastGIndex(nLastD, pOut); // 底归位
i = nLastD; // 从新的顶重新开始计算
kCountUp = 1; // 向上K线数量归位
nState = -1;
} else {
break;
}
}
}
}
delete[] pDirection;
delete[] pOutHigh;
delete[] pOutLow;
delete[] pInclude;
}
void Bi3(int nCount, float *pOut, float *pIn, float *pHigh, float *pLow)
{
float *pDirection = new float[nCount];
float *pOutHigh = new float[nCount];
float *pOutLow = new float[nCount];
float *pInclude = new float[nCount];
BaoHan(nCount, pDirection, pOutHigh, pOutLow, pInclude, pHigh, pLow);
for (int i = 1; i < nCount; i++)
{
if (pDirection[i-1] == 1 && pDirection[i] == -1)
{
pOut[i-1] = 1;
}
else if (pDirection[i-1] == -1 && pDirection[i] == 1)
{
pOut[i-1] = -1;
}
else
{
pOut[i-1] = 0;
}
}
if (pDirection[nCount-1]== 1)
{
pOut[nCount-1] = 1;
}
else if (pDirection[nCount-1]== -1)
{
pOut[nCount-1] = -1;
}
for (int i = 0; i < nCount; i++)
{
if (pOut[i] == 1)
{
int d = i;
for (int j = i - 1; j >= 0; j--)
{
if (pOut[j] == -1) break;
if (pHigh[j] > pHigh[d])
{
pOut[d] = 0;
d = j;
pOut[d] = 1;
}
}
}
else if (pOut[i] == -1)
{
int d = i;
for (int j = i - 1; j >= 0; j--)
{
if (pOut[j] == 1) break;
if (pLow[j] < pLow[d])
{
pOut[d] = 0;
d = j;
pOut[d] = -1;
}
}
}
}
delete []pDirection;
delete []pOutHigh;
delete []pOutLow;
delete []pInclude;
}