Hold RSI value until next value
Forums › ProRealTime English forum › ProBuilder support › Hold RSI value until next value
- This topic has 7 replies, 3 voices, and was last updated 4 years ago by Vonasi.
-
-
11/11/2020 at 12:41 PM #150118
Hi all!
Is it possible to some how hold a value depending on RSI (-1) until another RSI value is given and then change status to (1)?
Example;
IF RSI[14] > 70 then Short = -1 (i want it to hold -1 status until rsi drops under 30, then change to 1 and vise verse)
IF RSI[14] < 30 then Long = 1
Regards,
Pierre
11/11/2020 at 1:39 PM #15012411/12/2020 at 8:57 AM #150221Almost but not there.
I want it to hold -1 value as long as it doesnt get under RSI[14] < 30 and when it goes under 30 i want to hold the value 1 until it comes over RSI[14] > 70
11/12/2020 at 9:28 AM #150229If close crosses over 70 then Short = -1
if close crosses under 30 then Long = 1
not tested, but i think this will hold the value until the next cross
2 users thanked author for this post.
11/13/2020 at 10:40 AM #150364hum, no it doesn´t .. i have been trying to do if Short[1] is a specifik value then the next should be the same untill another value showes up..
maybe this is more advanced then i first thougt.
11/13/2020 at 5:01 PM #150400Not sure I fully understand but perhaps something like this?
123456789101112131415if rsi[14] crosses over 70 thenshort = -1endifif rsi[14] crosses under 30 and short = -1 thenshort = 1endifif rsi[14] crosses under 30 thenlong = 1endifif rsi[14] crosses over 70 and long = 1 thenlong = -1endif2 users thanked author for this post.
11/16/2020 at 8:47 AM #150604Big Thanks! That didn´t come up in my my mind to reverse it that way, i made it much harder in my mind 😀
and thanks @snucke for replying!
11/16/2020 at 9:56 AM #150625Glad you liked it however please don’t quote code in your replies unless it is totally necessary as part of your post. Also use the ‘quote’ button rather than cutting and pasting. I’ve tidied up your post.
1 user thanked author for this post.
-
AuthorPosts
Find exclusive trading pro-tools on