Condition Coding

I wanted to know whether it is possible to code the below strategy:

Short: When RSI(Close,14) is Below 50

Exit Short: When RSI(Close,14) is below 40 or if it reaches above 55 (i want to exit, if either of these condition meets first)

Sell-
CROSSOVER(RSI(CLOSE,14) ,50) 

Sell Exit-
CROSSOVER(RSI(CLOSE,14) ,40) OR CROSSOVER(RSI(CLOSE,14) ,55)
2 Likes

You want to code on what? Tradescript?

Yes on Tradescript.

Thanks a lot Andrew!

Thanks a lot. I would like to learn Tradescript.