Thanks. Will be checked, but the priority is low.
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
Even probably this code is not much used, I'm reporting this day zero bug for completeness, in case MQ wants to correct it.
Williams' %R oscillator (WPR) is in many way similar to RSI, with upper and lower ranges for detecting overbought and oversold price action. The theory is that one could look at reversals in these areas only to form trading decisions.
However, due to what I believe is a bug of distraction, the code looks instead outside these areas:
In both the if() statements, the WPR value check is done in error, as it should use less instead of greater, and viceversa.
Which cause the condition to be valid only when a reversal happens outside the range of oversold/overbought, that is, in the non decisive area. Just flip the chevrons around to get what Larry Williams wanted to convey.
It could have been caused by the peculiar negative scale of the oscillator as originally developed, which goes from 0 to -100, although the documentation duly notes this. In fact, the almost identically coded SignalRSI.mqh works fine, no surprise, as it uses a positive scale of 0 to +100.