You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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);
}