Hi, I was wondering if anyone can help me as i'm not a programmer.
I have seen the RSI long/short-entry strategy which comes as part of Tradestation's canned strategies. Code for RSI short-entry is below
inputs: Price( Close ), Length( 9 ), OverBought( 70 ) ;
variables: MyRSI( 0 ) ;
MyRSI = RSI( Price, Length ) ;
if Currentbar > 1 and MyRSI crosses under OverBought then
{ CB > 1 check used to avoid spurious cross confirmation at CB = 1 }
Sell Short ( "RsiSE" ) next bar at market ;
The only problem I have with this is that when I automate this strategy in practice, the RSI often crosses under 70 temporarily during the formation of the current candle and then following the close of the candle is back above 70. However, this doesn't stop tradestation from going short at the open of the next candle. What I would like is for the following:
"IF RSI VALUE < 70 AT 'CLOSE' OF CURRENT CANDLE, SELL SHORT NEXT BAR AT MARKET"
Does anyone know how I would alter the existing code above to accomplish this as I keep getting error messages when I try and modify it.
Many thx
Mark
I have seen the RSI long/short-entry strategy which comes as part of Tradestation's canned strategies. Code for RSI short-entry is below
inputs: Price( Close ), Length( 9 ), OverBought( 70 ) ;
variables: MyRSI( 0 ) ;
MyRSI = RSI( Price, Length ) ;
if Currentbar > 1 and MyRSI crosses under OverBought then
{ CB > 1 check used to avoid spurious cross confirmation at CB = 1 }
Sell Short ( "RsiSE" ) next bar at market ;
The only problem I have with this is that when I automate this strategy in practice, the RSI often crosses under 70 temporarily during the formation of the current candle and then following the close of the candle is back above 70. However, this doesn't stop tradestation from going short at the open of the next candle. What I would like is for the following:
"IF RSI VALUE < 70 AT 'CLOSE' OF CURRENT CANDLE, SELL SHORT NEXT BAR AT MARKET"
Does anyone know how I would alter the existing code above to accomplish this as I keep getting error messages when I try and modify it.
Many thx
Mark