Skip to content

Commit

Permalink
Fix a bug in CDLONNECK State func
Browse files Browse the repository at this point in the history
  • Loading branch information
Труфанов Александр authored and trufanov-nok committed Jan 8, 2024
1 parent 97f28f3 commit 107c459
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ta-lib-rt/c/src/ta_func/ta_CDLONNECK.c
Original file line number Diff line number Diff line change
Expand Up @@ -372,9 +372,10 @@ int i1;
STATE.gapBodyLong = MEM_SIZE - STATE.periodBodyLong;
}

i1 = GET_LOCAL_IDX(-1);

if (!(NEED_MORE_DATA))
{

if( TA_CANDLECOLOR_STATE_IDX(i1) == -1 && // 1st: black
TA_REALBODY_STATE_IDX(i1) > TA_CANDLEAVERAGE_STATE_IDX( BodyLong, STATE.BodyLongPeriodTotal, i1 ) && // long
TA_CANDLECOLOR_STATE_CUR() == 1 && // 2nd: white
Expand Down

0 comments on commit 107c459

Please sign in to comment.