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; ... }
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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...