Percentage Move on Friday – FX
Forums › ProRealTime English forum › ProScreener support › Percentage Move on Friday – FX
- This topic has 7 replies, 3 voices, and was last updated 2 years ago by Philley.
-
-
09/14/2022 at 3:44 PM #200802
Hi,
I’m trying to execute a screener to confirm if the price move at between 08:00 and 21:55 is above a certain percentage. The below code is not returning with an error shown in the “If (P1-P2)/P1 > 0.007 then” line. Screener to be executed on Sundays on certain FX pairs for the Friday move hence 0 to 0 loop.
Any help is greatly appreciated.
12345678910111213P1 = Open[080000]P2 = Open[215500]For y = 0 to 0If (P1-P2)/P1 > 0.007 thenc1 =1breakendifScreener [c1]09/14/2022 at 4:40 PM #200808The numbers between “brackets” after Open[…] are not intended for data.
Hence the error message.
Open[0] = the last Open
Open[1] = the previous Open
Etc.
If you want to use times, you can do it this way:
If OpenTime >= 080000 and OpenTime <= 215500 then
Or
If OpenTime = 080000 then
xOpen080000 = Open
ElsIf OpenTime = 215500 then
xOpen215500 = Open
EndIf
Percentage: (%)
(xOpen215500 – xOpen080000) / xOpen08000 * 100
If ((xOpen215500 – xOpen080000) / xOpen08000 * 100) > 0.7 then
C1
EndIf
1 user thanked author for this post.
09/15/2022 at 6:19 PM #20085909/16/2022 at 10:00 AM #200873The below code should be returning results on the daily candle for my FX pairs list but no joy, am I missing something
If OpenTime = 080000 then
xOpen080000 = Open
ElsIf OpenTime = 215500 then
xOpen215500 = Open
EndIf
If ((xOpen080000 – xOpen215500) / xOpen080000) > 0.007 then
C1 = 1
EndIf
SCREENER [C1]
09/16/2022 at 11:12 AM #200875On a Daily candle there’s no intraday time, it starts at a fixed time and ends at a fixed time.
There must be a candle opening/closing at anyone of the chosen times.
09/16/2022 at 7:41 PM #200909Hi @Philey
Try it with this screener…
The screener calculates the “Move” of the selection on the last Friday
The “Move” must take place between 08:00 and 22:00 on Friday.
When this “Move” is greater than 0.007 then the signal = 1
You should not use this screener on Friday before 22:00 otherwise it will work with the wrong values (before 22:00 it will use a value from the previous Friday)
You must set the “Period” in your screener to 1 hour otherwise the times cannot be read.
%MoveOnFriday1234567891011121314151617xPercent = 0.007Signal = 0If DayOfWeek = 5 and OpenTime = 080000 thenxOpen080000 = OpenElsIf DayOfWeek = 5 and OpenTime = 220000 thenxOpen220000 = OpenEndIfxMove = abs((xOpen080000 - xOpen220000) / xOpen080000)If xMove > xPercent thenSignal = 1EndIfScreener[Signal](Signal as "%Move")10/05/2022 at 10:48 AM #201935The below screener is working perfectly however I need to add a few additional conditions namely RSI and bollinger band levels on the daily chart. Given that the below code works only in the 1hr candles is there anyway I can incorporate the RSI and bollinger band daily values in the same screener?
123456789101112131415161718Signal = 0If DayOfWeek = 5 and OpenTime = 080000 thenxOpen080000 = OpenElsIf DayOfWeek = 5 and OpenTime = 210000 thenxClose210000 = CloseEndIfxMovedown = ((xOpen080000 - xClose210000) / xOpen080000)xMoveUp = ((xClose210000 - xOpen080000) / xOpen080000)If xMovedown > xPercent thenSignal = 1Elsif xmoveUp > xpercent thenSignal = 1EndIfScreener[Signal]10/06/2022 at 10:06 AM #201991The below is my current take on the issue . . .
12345678910111213141516171819202122xPercent = 0.007Signal = 0If dayofweek = 5 then RSIFri = timeframe (daily) RSI[14](close)endifIf DayOfWeek = 5 and OpenTime = 080000 thenxOpen080000 = OpenElsIf DayOfWeek = 5 and OpenTime = 210000 thenxClose210000 = CloseEndIfxMovedown = ((xOpen080000 - xClose210000) / xOpen080000)//xMoveUp = ((xClose210000 - xOpen080000) / xOpen080000)If xMovedown > xPercent and RSIFri < 40 thenSignal = 1EndIfScreener[Signal]Thanks!
-
AuthorPosts