Redirect

Thursday, May 29, 2008

SPY Divergence


The SPY is divergent on the 5 min chart and failed to close over the 21 day MA. I could see it slipping back a few points here and I'm short from 140.43

1 comment:

Jeff said...

Johnson, this is the code for the basic strategy. Let me know how it turns out.

{ RSI2_V1.0 Basic RSI(2) strategy: Buy when RSI(2)<10 and sell when RSI(2)>80 }

input: RSILen( 2 ),
BuyZone( 10 ),
SellZone( 80 );

Variables: MyRSI( 0 );

MyRSI = RSI(Close, RSILen) ;

// Long Entry
if CurrentBar > 1 and MyRSI Crosses Below BuyZone Then
Buy ("RSILE") Next Bar at Market ;

// Exit Long Position
If marketPosition = 1 and MyRSI Crosses Above SellZone then
Sell ( "RSILX" ) Next Bar at Market ;