How to take Profit with RSI Indicator signal is reached.

 
Hello,
        I am trying to Close an open trade once RSI signal is at Threshold. 

My trade triggers fine when RSI is above 80, but i am trying to close it when it reaches 20. 

How do i do this?  I feel like I am over thinking this....
 

Show your code.

Use the code button (Alt+S) when pasting code.