EA suddenly not opening orders - page 2

 
YThi MJ:
Here it is with the indicators, all in MQ4, just in case you want to check it. Only 1 indicator is in .ex4, I have not got the .mq4

Great , someone might help if they have time .

Otherwise https://www.mql5.com/en/job

Trading applications for MetaTrader 5 to order
Trading applications for MetaTrader 5 to order
  • www.mql5.com
i am want this sl theory added my ea ZigZag Depth..also needed curruncy index group type show main chart........group type view time very easy user on/intarday stronger weaker index selecting trade... very important me sl me ea very higher drawdown more reduce ..last updates well for eurusd but higher drawdown I need to make something like this...
 
Lorentzos Roussos:

Great , someone might help if they have time .

Otherwise https://www.mql5.com/en/job

Sure. Thanks Roussos

 
  1. YThi MJ:

    This is the code for sending orders

    How can I check if all iCustom Indicators are working?

    Use the debugger or print out your variables, including _LastError and prices and find out why. Do you really expect us to debug your code for you?

  2. int open=OrderSend(Symbol(),OP_SELL,Lot(),Bid,Slip,sls,0,CommentSell,Magic,0,Red);

    Check your return codes, and report your errors. Don't look at GLE/LE unless you have an error. Don't just silence the compiler, it is trying to help you.
              What are Function return values ? How do I use them ? - MQL4 programming forum
              Common Errors in MQL4 Programs and How to Avoid Them - MQL4 Articles

 
William Roeder:
  1. Use the debugger or print out your variables, including _LastError and prices and find out why. Do you really expect us to debug your code for you?

  2. Check your return codes, and report your errors. Don't look at GLE/LE unless you have an error. Don't just silence the compiler, it is trying to help you.
              What are Function return values ? How do I use them ? - MQL4 programming forum
              Common Errors in MQL4 Programs and How to Avoid Them - MQL4 Articles

Thanks Roeder, I will check it but there are no errors in the compiler, and it worked until Monday, lets say. The same day I made the modifications. Apart from it, it looks like my IP has been blocked. I have attached one of the old ones to an MT4 outside of the VPS and it worked. Still, I will have to check for the new for I have not seen any orders yet.


Basically I added the iADX signals but they must be coded wrong, although they work in backtest.

 
      double ADX = iADX(NULL,TimeFrame12,Period12,Price12,Mode12,Shift12);
      double ADXminus = iADX(NULL,TimeFrame14,Period14,Price14,Mode14,Shift14);
      double ADXplus = iADX(NULL,TimeFrame15,Period15,Price15,Mode15,Shift15);  

	if(CountTrades()<1)
               if(OrdersHistoryTotal()<1)
                  if((ADX>Value12)&&(ADXplus>ADXminus))
                     if((Ask>PSAR1)&&(Ask>PSAR2)&&(lim2>0||lim21>0||lim20>0)&&(CBA_botcl!=EMPTY_VALUE)&&(CBA_botclS!=EMPTY_VALUE))
                       {
                        int open=OrderSend(Symbol(),OP_BUY,Lot(),Ask,Slip,slb,0,CommentBuy,Magic,0,Blue);
                       }
                     else
                        if((ADX>Value12)&&(ADXminus>ADXplus))
                           if((Bid<PSAR1)&&(Bid<PSAR2)&&(red2>0||red21>0||red20>0)&&(CBA_topcl!=EMPTY_VALUE)&&(CBA_topclS!=EMPTY_VALUE))
                             {
                              int open=OrderSend(Symbol(),OP_SELL,Lot(),Bid,Slip,sls,0,CommentSell,Magic,0,Red);
                             }

Is there anything wrong with this code for not sending an order?

Reason: