RSI Retouch 30 or 70 level

 

HI,

I would like to know in a Boolean when the RSI repass the 30 Level and same with the 70. How can I do that can someone post a piece of code? I know how to check when the rsi touch the 30 line for example but not when it retouch by going up.


Thank you!

Jérôme



 
jerome77:

HI,

I would like to know in a Boolean when the RSI repass the 30 Level and same with the 70. How can I do that can someone post a piece of code? I know how to check when the rsi touch the 30 line for example but not when it retouch by going up.


Thank you!

Jérôme



I can give in pseudo-code

if (rsi[pos+1] < 30 && rsi[pos] > 30) { return true; }
 


Hi Lee,

Thank you very much!Can you give me a little more code?I mean whats exactly the variable pos.

Thank you very much!

Jérôme

 
jerome77 #: whats exactly the variable pos.

The variable you used to index the bar you want to test for a cross.

MT4: Learn to code it.
MT5: Begin learning to code it.

If you don't learn MQL4/5, there is no common language for us to communicate. If we tell you what you need, you can't code it. If we give you the code, you don't know how to integrate it into your code.

You haven't stated a problem, you stated a want. Show us your attempt (using the CODE button) and state the nature of your problem.
          No free help (2017)

Or pay someone. Top of every page is the link Freelance.
          Hiring to write script - General - MQL5 programming forum (2018)

We're not going to code it for you (although it could happen if you are lucky or the problem is interesting).
          No free help (2017)