Ruptor: What does the WPR indicator do for a value when the difference between the highest and lowest is zero?
It leaves the buffer[i] as it is. (Probably EMPTY_VALUE) if(!CompareDouble(...)
I should change the wording of the question to what does the screen buffer make of it and what is the consequence for the display? On the screen it looks like the display buffer/filter combination assumes the same value as the previous point because the line doesn't appear to move. If the value was taken as zero or the enormous empty value was used the graph line would spike to zero or infinity but it doesn't.
EMPTY_VALUE nothing is displayed for that bar. The line gaps.
I haven't seen any gaps. The situation seems to happen often enough to see. It would make more sense to use the previous value instead of leaving a funny number in the indicator to prevent problems with EA usage getting duffy numbers.
Ruptor:
What is your value for ExtWPRPeriod ?
What does the WPR indicator do for a value when the difference between the highest and lowest is zero? Here is the calculation from the indicator.
13 for the period but I can't see why that matters? An empty value in any indicator would stuff any EA that was reading it unless it was handled wouldn't it. Gaps are bad news.
Ruptor:
13 for the period but I can't see why that matters? An empty value in any indicator would stuff any EA that was reading it unless it was handled wouldn't it. Gaps are bad news.
Have you already seen the highest high and the lowest low of 13 candles of a forex chart being equals ? Don't waste your time with theoretical issues.
13 for the period but I can't see why that matters? An empty value in any indicator would stuff any EA that was reading it unless it was handled wouldn't it. Gaps are bad news.
It is not a waste of time to identify all possible sources of error as any good engineer will tell you. This indicator also has the problem of a bias because it allows limitless negative excursions but has a ceiling to positive values of zero so it if it is filtered this would make the bias worse.
![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
What does the WPR indicator do for a value when the difference between the highest and lowest is zero? Here is the calculation from the indicator.