HT_TRENDLINE writes to, but doesn't read, the smoothPrice circular buffer
Brought to you by:
fortier
In src/ta_HT_TRENDLINE.c
, the smoothPrice
buffer is populated with values, but those values are never actually read. The comments indicate that the smoothPrice is being used, but instead the direct input is being used (and averaged over).
/* idx is used to iterate for up to 50 of the last * value of smoothPrice. */ idx = today; tempReal = 0.0; for( i=0; i < DCPeriodInt; i++ ) tempReal += inReal[idx--];
I believe that this is either a case of:
1. a fault in the calculation, or
2. an incorrect comment and unnecessary use of processing time and resources to maintain the smoothPrice.
At this point I am unclear which of the above applies here.
Correction:
src/ta_func/ta_HT_TRENDLINE.c
.