Variables with String data
Forums › ProRealTime English forum › ProScreener support › Variables with String data
- This topic has 6 replies, 2 voices, and was last updated 7 years ago by
Nicolas.
-
-
02/06/2018 at 7:07 PM #61770
Hi,
I’ve searched around manuals and this forum, and I fail to find an answer. Not finding how to do it, neither finding a confirmation that it’s not possible. So I turn to all you guys here for help.
Is there a way to get a variable to hold a text string?
I wrapped up some very simple example code. (just a sample to visualize my question, not an idea for a good scanner 😉
With the bellow scanner, I would get a column in the proscreener window with the name “Bull or Bear”, and in the column the number 1 or 2 would show.
Is there a way to get the variable “varBullOrBear” to hold a text string instead? I many other programming scenarios I would use varBullOrBear = “Bull”, and so forth, but it doesn’t seem to work in this language.
I would like to display text info in the column in Proscreener instead of a number. Is it possible, if so, how?
thanks in advance
—————————
condition1 = Average[100](close) > Average[200](close)
condition2 = Average[100](close) < Average[200](close)if condition1 then
varBullOrBear = 1
endifif condition2 then
varBullOrBear = 2
endifscreener [condition1 or condition2] (varBullOrBear as “Bull or Bear”)
02/06/2018 at 7:22 PM #6177302/06/2018 at 7:28 PM #61776Thank for the very quick response!
Even though it wasn’t the answer I wished for, I accept the limitation. 🙂
02/13/2018 at 8:43 PM #62657A follow-up question using the same example above. I didn’t find any answer in the programming guide.
Using the above example the sorting will always be high to low. Let’s say that I value the result “1” higher than “2”, then I obviously would like to show the 1’s on top of the list. Is there a way to reverse the sorting?
thanks in advance
02/14/2018 at 10:56 AM #6269402/14/2018 at 11:19 AM #62707Hi,
I was more looking for a code way of doing it. You might have more than one scanner with different preferences, then it would be nice to be able to do it from the code.
02/14/2018 at 11:25 AM #62710 -
AuthorPosts
Find exclusive trading pro-tools on