my ea does not trade

 

hi all i developed an ea based on rsi,i compiled it with no errors but when i foward test it doesnt take trades when the trading conditions are met.please somebody help me.

below is the code for the ea:


int start()
{
double RSI_0 = iRSI(NULL,0,14,PRICE_CLOSE,0);
double RSI_1 = iRSI(NULL,0,14,PRICE_CLOSE,1);
int ticket;
if((RSI_0 > BUYsignal) && (RSI_1 <= BUYsignal))
ticket=OrderSend(Symbol(),OP_BUY,lots,Ask,3,SL,TP,"",magicnumber,0,Red);
if(ticket<0)
{
Print("OrderSend failed with error #",GetLastError());
return(0);
}


if((RSI_0 < SELLsignal) && (RSI_1 >= SELLsignal))
ticket=OrderSend(Symbol(),OP_SELL,lots,Bid,3,SL,TP,"",magicnumber,0,Red);
if(ticket<0)
{
Print("OrderSend failed with error #",GetLastError());
return(0);
}

 

Hi Foreal

It must be a value problem because I can't see anything wrong with the code yet. Check the journal for errors and check the values of BUYsignal and SELLsignal by printing them out.

 
What volume of SL and TP?