Friday, June 15, 2007

RSI

This is same as Stochastic except stoc is is replaced by RSI .

Long win/loss = 370/184 => 4/2 => 2/1
profitLong:0.0370
profitShort: 0.0370
lossLong: -0.0184
lossShort: -0.0267


ran as java STOCK stopLoss_Padding crossover_padding
ran as java EURO-CHF 10 3


if (( pmtd < 0 ) && ( pmtdDAYBEFORE > 0 ) && ( (pRSI >= 40) && (pRSI <= 70) ) )
prediction = goshort ;
else if (( pmtd > 0 ) && ( pmtdDAYBEFORE < 0 ) && ( (pRSI >= 30) && (pRSI <= 60) ) )
prediction = golong ;
else if ( ( (runningTrade == golong ) && (pRSI > 70)) || ( pHigh < pHigh_Arr.get(i-1)) )
prediction = closeAtNextOpen ;
else if ( ((runningTrade == goshort ) && (pRSI < 30)) || ( pLow > pLow_Arr.get(i-1)) )
prediction = closeAtNextOpen ;
----
what Murthy is asking is below, it needs 2 pass program to note RSI crossCross below ( 40) and then again crossed above 40 then any day later medium trend crossed above 0 then take LONG position ..

<<<<
Go long when RSI falls below the 40 level and rises back above it
or on a bullish divergence where the first trough is below 40.

exit: when medium term diff crosses below 0

>>>>

<<
MACD DIVERGENCE STRATERGY:
Go long when the MACD line crosses the signal line from below.

Go short when the MACD line crosses the signal line from above.
Unless there is a divergence, do'nt go for long if the signal is above the zero line, nor go short if the signal is below zero.

Place stop loss orders below the last minor Low when long, or the last minor High when short.

>>

No comments: