How to fill empty cell in buffer with prior value
void pivothigh(const double &high[], double &output[], int left, int right, int start_pos, int count) { for(int index=start_pos+count-1;index>=start_pos;index--) { if(output[index+1]==EMPTY_VALUE) output[index+1]=output[index+2]; bool next_index=false; int i=index+right; for(int j=i+1;j<i+1+left;j++) { ... } void pivotlow(const double &low[], double &output[] , int left, int right, int start_pos, int count) { for(int index=start_pos+count-1;index>=start_pos;index--) { if(output[index+1]==EMPTY_VALUE) output[index+1]=output[index+2]; bool next_index=false; int i=index+right; for(int j=i+1;j<i+1+left;j++) { if(j>Bars(_Symbol, PERIOD_CURRENT)-1) break; ... }
I found a Pivot indicator, that identifies the highest candle among a set or before and after candles. It only marks the position of the pivot candle. This is the same idea of the fractal indicator, with the difference that the pivot indicator is flexible on how many candles on the right and left to search for.
I wonder if an expert among you could help me with the missing line of code, so that each empty cell carries the latest pivot...
I am adding this line, but it does not work:
Here is the full code...