Here are the conditions:
PHP Code:
if(iRSI(NULL,0,14,PRICE_CLOSE,0)<RSI14_Value_Buy_Open) //open buy where rsi is lower than some value
{
if(iRSI(NULL,0,14,PRICE_CLOSE,0)>iRSI(NULL,0,14,PRICE_CLOSE,1)) //and RSI is going up
{
if(iRSI(NULL,0,5,PRICE_CLOSE,0)>iRSI(NULL,0,14,PRICE_CLOSE,0)+RSI5_Diff_Buy) //and rsi5 is higher n points
{
if(iRSI(NULL,0,5,PRICE_CLOSE,0)<iRSI(NULL,0,5,PRICE_CLOSE,1))
{
if(iRSI(NULL,0,5,PRICE_CLOSE,1)<iRSI(NULL,0,14,PRICE_CLOSE,1))
With these conditions we have NO buys during 2007. Are you sure you are getting everything right?
I've used your rules:
RSI crossover:
1. buy when
RSI-14 < 40 (1st condition)
RSI-14 of this bar is higher than RSI-14 of the previous bar (second condition)
RSI-5 is at least 5 points higher than RSI-14 (third)
... and, RSI-5 of this bar is lower than RSI-5 of the previous bar (added this, fourth condition)
Like what happened on Apr 4 (0H), when the value of RSI-5 is 44, and RSI-14 is 37 (difference of at least 5 points). And the previous value at Apr 3 (23H) of RSI-5 is 22, and RSI-14 is 29, to make a RSI "cross".
The value of which are taken at the close of the candle, at the candle where the cross just happened. If it happened on the next candle, we don't open any trade at all.
Please re-write that passage in typical English, I do not quite understand "the value of which are taken at the close of the candle". We use last value and current value. I've checked before-last value and last value. In both cases no buys at all.
Stoploss of 20, kindly added by me, kindly eats your depo in 10 deals. Use 100 instead.
If you actually meant that RSI5 should be going UP for buy, then we have buy orders this year.