Need script to exit trade on RSI value

 

Hello,

I need to create a script to exit a trade on a certain RSI (7) value. Can someone show me how to do this??

I have seen lots of scripts to exit trades based on a certain price, but I need to exit trades based on specific RSI (7) value.

Thanks!!!

 

certainValue = iRSI(..., ..., ...)

if(certainValue == whatever) OrderClose(..., ..., ...)