Triple Currency Signal EA still not making trades after code correction ??

 

I am becoming puzzled as to why this EA doesn't make any trades in the backtesting.

This only trades the EURJPY on the 1 min. chart .(Correction on my earlier statement of the EURUSD).

The actual symbols have been put in now to replace symbol1, symbol2 etc. Just doesn't want to make

any trades? Because this has to have an alignment of all 3 currency symbols RSI'S, there are periods when

this does not make any trades. Even so there should be plenty of trades over 1 yr. of backtesting. Right now

it produces none.

Thanks,

JimTrader1

Files:
 
use Print() to find out
 
jimtrader1:

I am becoming puzzled as to why this EA doesn't make any trades in the backtesting.

This only trades the EURJPY on the 1 min. chart .(Correction on my earlier statement of the EURUSD).

The actual symbols have been put in now to replace symbol1, symbol2 etc. Just doesn't want to make

any trades? Because this has to have an alignment of all 3 currency symbols RSI'S, there are periods when

this does not make any trades. Even so there should be plenty of trades over 1 yr. of backtesting. Right now

it produces none.

Thanks,

JimTrader1


Here is a starting point to debuging your code. If you get this function to work, you may want to check the rest of the program.

void CheckForOpen()
  {
   double rsi;             
   double sir;
   double rsg;
   double sgs;
   double rig;
   double sig;
   double rss;
   double sis;
   double reg;
   double seg;
   double rgd;
   double sgd;
   int cnt, ticket, total;
//---- go trading only for first tiks of new bar
   Print("Begin CheckForOpen ");              //<---- debug print
   if(Volume[0]>1) return;                    //<---- ? never get past here
   Print("Past Volume CheckForOpen ");        //<---- debug print
//---- get RSI
   rsi=iRSI("EURJPY",PERIOD_M1,4,PRICE_CLOSE,0);
   sir=iRSI("EURJPY",PERIOD_M1,4,PRICE_CLOSE,1);
   rss=iRSI("EURJPY",PERIOD_M5,4,PRICE_CLOSE,0);
   sis=iRSI("EURJPY",PERIOD_M5,4,PRICE_CLOSE,1);
   rsg=iRSI("EURUSD",PERIOD_M1,4,PRICE_CLOSE,0);
   sgs=iRSI("EURUSD",PERIOD_M1,4,PRICE_CLOSE,1); 
   reg=iRSI("EURUSD",PERIOD_M5,4,PRICE_CLOSE,0);
   seg=iRSI("EURUSD",PERIOD_M5,4,PRICE_CLOSE,1);
   rgd=iRSI("USDJPY",PERIOD_M1,4,PRICE_CLOSE,0);
   sgd=iRSI("USDJPY",PERIOD_M1,4,PRICE_CLOSE,1);
   rig=iRSI("USDJPY",PERIOD_M5,4,PRICE_CLOSE,0);
   sig=iRSI("USDJPY",PERIOD_M5,4,PRICE_CLOSE,1); 
   return(0);                                       //<---- ? 
   Print("Past RSI Calc");                         // <---- debug print 
//---- sell conditions
   if((rsi<sir) && (rss<sis) && (rsg<sgs) &&
    (reg<seg) && (rgd<sgd) && (rig<sig))
     
      res=OrderSend(NULL,OP_SELL,LotsOptimized(),Bid,3,0,0,"",MAGICMA,0,Red);   //<---- might want to check return codes!
      return;
     {                                              //<---- ? lined up with what "if" ?
//---- buy conditions
   if((rsi>sir) && (rss>sis) && (rsg>sgs) &&
    (reg>seg) && (rgd>sgd) && (rig>sig))
    
      res=OrderSend(NULL,OP_BUY,LotsOptimized(),Ask,3,0,0,"",MAGICMA,0,Blue);   //<---- might want to check return codes!
      return;                                        
     }                                             //<--- ? same as above
   }

Good luck.

 
regardless, Volume[] or iVolume() isn't reliable use Time[] or iTime() instead
 
danjp:


Here is a starting point to debuging your code. If you get this function to work, you may want to check the rest of the program.

Good luck.


Great. I didn't really know how to use the Print statement for this. Maybe this will help.
Reason: