It seems the PRT screener can only ever return one variable for any instrument matching screening criteria.
Are there plans to allow more than one to be returned ?
If not, how many options are there for “overloading” the one value returned ?
e.g an instrument matching a 15 minute “hit” on the screener with for example an RSI of 82 could be returned as 15,082 with some simple maths.
Even direction can be added by using positive and negative numbers ( +15,082 and -15,082), however at that point are there more options ( use of colour / font / colour of the entry in the list ? )
Is it possible to return text strings in any way ? ( ASCII encoding ? )
You can use a simple math. in your cas your RSI periods will need the rightmost 3 digits (0 -999), so you will have to multiply 15 by 1000 to make it use the two leftmost digits:
1
2
3
4
TIMEFRAME(15minute)
MyRsi=Rsi[14](close)
ReturnValue=15000+MyRsi
SCREENER[MyRsi>50](ReturnValueAS"My Criterion")
But this won’t help much if you use several TF’s. In this case I suggest that you use a pattern where the single digits refers to a single TF and, for each one of them, you could use 1 for positive data or 2 for negative data. Say you want to use 3 TF’s (4-hour, 1-hour and 15-minute TF’s), with 1=Macd > 0 and 2=Macd < 0, you could write:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
TIMEFRAME(4hour)
MyMacd4=Macd[12,26,9]
TIMEFRAME(1hour)
MyMacd1=Macd[12,26,9]
TIMEFRAME(15minute)
MyMacd15=Macd[12,26,9]
TIMEFRAME(default)
IFMyMacd4>0THEN
Result4=100
ELSE
Result4=200
ENDIF
IFMyMacd1>0THEN
Result1=10
ELSE
Result1=20
ENDIF
IFMyMacd15>0THEN
Result15=1
ELSE
Result15=2
ENDIF
Result=Result4+Result1+Result15
SCREENER[Result](ResultAS"415")
the last line shows 415, where “4” refers to the 4-hour TF, “1” to the 1-hour TF and “5” to the 15-minute TF.
As from attached pic, the first item in the list shows that AudUsd’s MACD is above 0 on the 4-h and 1-h TF’s, but below 0 on the 15-minute TF.
To help us continually offer you the best experience on ProRealCode, we use cookies. By clicking on "Continue" you are agreeing to our use of them. You can also check our "privacy policy" page for more information.Continue