It is ranging between 0 and -100. If you want to have values between +100 and -100 then add 50 to wpr and multiply the result by 2 (like this :
wprModified = 2*(wpr+50)
and then the results are going to range between +100 and -100
Hi Mladen,
Instead of the -100/100 scale...can he multiply the negative WPR numbers by ABS to turn them positive...?
That way the scale is 0-100 and the 20/80 levels are still usable...or whatever levels he wants like 30/70...?
Also thanks for letting me/us know that the WPR calculations for MT4 are different than MT5. I don't use MT5 and the WPR calc I found was from a wiki..
Thanks and God Bless you and others here for all your help,
Instead of the -100/100 scale...can he multiply the negative WPR numbers by ABS to turn them positive...?
That way the scale is 0-100 and the 20/80 levels are still usable...or whatever levels he wants like 30/70...?
Also thanks for letting me/us know that the WPR calculations for MT4 are different than MT5. I don't use MT5 and the WPR calc I found was from a wiki..
Thanks and God Bless you and others here for all your help,
Robert
Robert
He should add 100 in that case (abs would make a mirror image)
Also he ca use Stochastic with slowing set to 1 and price to High/Low (in that case it will be the same as WPR+100)
Depends if he wants to keep the negative values too
does anyone know any good settings for william %r and a time frame
use value 30 for the EXTWPRPeriod setting and set on the 1 hr timeframe
how can I obtain the price value for the 20/80 line on the williams percent in an EA without using the icustom function?
Hi Increase,
You can put the Williams % formula directly in your EA and then calculate the 20% and 80% levels based on the WPR values you get.
Here is the basic WPR formula - Calculation
%R = (HIGH(i - n) - CLOSE) / (HIGH(i - n) - LOW(i - n))*100
where:
CLOSE — is today’s closing price;
HIGH(i-n) — is the highest high over a number (n) of previous periods;
LOW(i-n) — is the lowest low over a number (n) of previous periods.
Hope this helps you,
Robert
Hi Increase,
You can put the Williams % formula directly in your EA and then calculate the 20% and 80% levels based on the WPR values you get.
Here is the basic WPR formula - Calculation
%R = (HIGH(i - n) - CLOSE) / (HIGH(i - n) - LOW(i - n))*100
where:
CLOSE — is today’s closing price;
HIGH(i-n) — is the highest high over a number (n) of previous periods;
LOW(i-n) — is the lowest low over a number (n) of previous periods.
Hope this helps you,
RobertHello Robert, thanks for your help, I think that formula is for MT5?
Here is what I have at the moment, I am using MT4
hi = 0;lo = 0;for(x=Bars;x>=0;x--) {
if(iWPR(NULL,0,100,x) > -30 && iWPR(NULL,0,100,x) < -27) hi = Close[x];if(iWPR(NULL,0,36,x) -73) lo = Close[x];}
My issue is, It does not give me the correct price for the 30 and 50 lines
Hello Robert, thanks for your help
This gives me a better result but is still not consistent across different symbols
hi = 0;lo = 0;for(x=Bars;x>=0;x--) {
if(iRSI(NULL,0,11,PRICE_CLOSE,x) > 69 && iRSI(NULL,0,11,PRICE_CLOSE,x) < 71) hi = Close[x];if(iRSI(NULL,0,14,PRICE_CLOSE,x) 29) lo = Close[x];}
Hello Robert, thanks for your help, I think that formula is for MT5?
Here is what I have at the moment, I am using MT4
hi = 0;lo = 0;for(x=Bars;x>=0;x--) {
if(iWPR(NULL,0,100,x) > -30 && iWPR(NULL,0,100,x) < -27) hi = Close[x];if(iWPR(NULL,0,36,x) -73) lo = Close[x];}
My issue is, It does not give me the correct price for the 30 and 50 linesincrease
That is a "generic" formula (used to describe what should be calculated). MQL5 formula would be different
increase That is a "generic" formula (used to describe what should be calculated). MQL5 formula would be different
Hi mladen
so any ideas how I could obtain the two levels 30/70?
Hi mladen so any ideas how I could obtain the two levels 30/70?
increase
You can not have positive values with WPR
It is ranging between 0 and -100. If you want to have values between +100 and -100 then add 50 to wpr and multiply the result by 2 (like this :
wprModified = 2*(wpr+50)
and then the results are going to range between +100 and -100
increase
You can not have positive values with WPR
It is ranging between 0 and -100. If you want to have values between +100 and -100 then add 50 to wpr and multiply the result by 2 (like this :
wprModified = 2*(wpr+50)
and then the results are going to range between +100 and -100Hi Mladen,
Instead of the -100/100 scale...can he multiply the negative WPR numbers by ABS to turn them positive...?
That way the scale is 0-100 and the 20/80 levels are still usable...or whatever levels he wants like 30/70...?
Also thanks for letting me/us know that the WPR calculations for MT4 are different than MT5. I don't use MT5 and the WPR calc I found was from a wiki..
Thanks and God Bless you and others here for all your help,
Robert
Hi Mladen,
Instead of the -100/100 scale...can he multiply the negative WPR numbers by ABS to turn them positive...?
That way the scale is 0-100 and the 20/80 levels are still usable...or whatever levels he wants like 30/70...?
Also thanks for letting me/us know that the WPR calculations for MT4 are different than MT5. I don't use MT5 and the WPR calc I found was from a wiki..
Thanks and God Bless you and others here for all your help,
RobertRobert
He should add 100 in that case (abs would make a mirror image)
Also he ca use Stochastic with slowing set to 1 and price to High/Low (in that case it will be the same as WPR+100)
Depends if he wants to keep the negative values too
Robert
He should add 100 in that case (abs would make a mirror image)
Also he ca use Stochastic with slowing set to 1 and price to High/Low (in that case it will be the same as WPR+100)
Depends if he wants to keep the negative values tooJust an update I switched to stochastic and it does exactly what I want, thanks guys