OK here's the update, what am I missing?
The purpose of this EA is to buy and sell when the RSI crosses and closes above and below the 50 line. When the RSI closes below the 50 a sell order is placed, then when it crosses back up above the 50 line, the sell order is closed and replaced with a buy order etc...