Unable to execute trades after software update/ <Deleted>

 

Hello,

To follow here are my notes & timeline if this helps anyone track this matter.

On January 20th, I observed issues with my expert advisor executing trades.  I called <Deleted> help desk and was advised to open a new demo account; however, I was not able to get past the setup  screen to establish a new account unless I selected MeteQuotes as my answer choice. ( i.e. I could "not" select <Deleted> as my broker).  The AMP help desk representative said he had seen this recently and advised me to uninstall & reinstall my already up to date software.
( Version 5.00 || build 2760 || 20 Jan 2021 )

After uninstalling & reinstalling the MT5 latest release I continued to have problems getting my expert advisor to place trades on this demo account:

Server   : <Deleted>

Login    : <Deleted>
Password : <Deleted>

To further troubleshoot this matter on my side, I created a simple expert advisor to confirm this problem and I have attached my code here (as a text file "CASH_MONEY_TEST - FULL BACKUP THURSDAY 01-21-21 at 09-07 AM").
This expert advisor displays Comment on screen & also printed to the log file as to when trade should be executed; however, there are no trades executed.

This information was sent to MT5 support and their response was "to refer to MT5 platform user guide; press F1 while logged into terminal; group demofutures is enabled for Expert Advisors."

Manager Daniel at <Deleted> Global confirmed that group demofutures for Expert Advisors was enabled and is the default setting.

Be sure and let me know if you have questions, need more info. 
Thank you for your prompt attention to this very urgent matter!

Sam Cowen

I am posting sample expert advisor

//+------------------------------------------------------------------+
//|                                                   cash_money.mq5 |
//|             Copyright 2021, Cowen Funding Services, LLC of Texas |
//+------------------------------------------------------------------+
   #include<Trade\Trade.mqh> CTrade trade;
   #include <Indicators\Indicator.mqh>
   #include <MovingAverages.mqh>
//+------------------------------------------------------------------+
//| Global Indicator Variable Declarations                           |
//+------------------------------------------------------------------+
//+------------------------------------------------------------------+
//| Trade Management Variable Declarations                           |
//+------------------------------------------------------------------+
   int lot=1;string trade_description="";
   double buy_sl=0;double buy_tp=0;double sell_sl=0;double sell_tp=0;
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
{
//+------------------------------------------------------------------+
//| Expert OnTick function Begining                                  |
//+------------------------------------------------------------------+
            //+------------------------------------------------------------------+
            //| Buy & Sell Trade Definitions                                     | 
            //+------------------------------------------------------------------+
               //ø--(+|SHORT EXIT----------------------------------(+|-----------------------------------------------------------------------------------------------------------------||
                  if(              
                       PositionSelect(_Symbol)                        ==   true
                  &&   PositionGetInteger(POSITION_TYPE)              ==   POSITION_TYPE_SELL
               //ø--(+|COMMENTS:
               //ø--(+|PRICE ACTION VALUES@[LOW ]------------------(+|-----------------------------------------------------------------------------------------------------------------||
                  &&   iLow(_Symbol,_Period,1)                        <=   iLow(_Symbol,_Period,0)
               //ø--(+|END-ALL-SHORT-EXIT-CONDITIONS---------------(+|-----------------------------------------------------------------------------------------------------------------||
                    )
                       {
                       { trade_description="SHORT EXIT";trade.PositionClose(_Symbol);Print(trade_description);}
                       }
               //ø--(+|LONG ENTRY----------------------------------(+|-----------------------------------------------------------------------------------------------------------------||
                  if(            
                       PositionSelect(_Symbol)                        !=   true
                  &&   PositionsTotal()                               ==   0
               //ø--(+|COMMENTS:
               //ø--(+|PRICE ACTION VALUES@[LOW ]------------------(+|-----------------------------------------------------------------------------------------------------------------||
                  &&   iLow(_Symbol,_Period,1)                        <=   iLow(_Symbol,_Period,0)
               //ø--(+|END-ALL-LONG-ENTRY-CONDITIONS---------------(+|-----------------------------------------------------------------------------------------------------------------||
                     )
                        {
                        {trade_description="LONG ENTRY";trade.Buy(1,_Symbol,SymbolInfoDouble(_Symbol,SYMBOL_ASK),NULL,NULL,NULL);Print(trade_description);}
                        }
               //ø--(ø|LONG EXIT-----------------------------------(+|-----------------------------------------------------------------------------------------------------------------||
                  if(              
                       PositionSelect(_Symbol)                        ==   true
                  &&   PositionGetInteger(POSITION_TYPE)              ==   POSITION_TYPE_BUY
               //ø--(+|COMMENTS:
               //ø--(+|PRICE ACTION VALUES@[HIGH]------------------(+|-----------------------------------------------------------------------------------------------------------------||
                  &&   iHigh(_Symbol,_Period,1)                       >=   iHigh(_Symbol,_Period,0)
               //ø--(+|END-ALL-LONG-EXIT-CONDITIONS----------------(+|-----------------------------------------------------------------------------------------------------------------||
                     )
                        {
                        {trade_description="LONG EXIT";trade.PositionClose(_Symbol);Print(trade_description);}
                        }
               //ø--(+|SHORT ENTRY---------------------------------(+|-----------------------------------------------------------------------------------------------------------------||
                  if(             
                     PositionSelect(_Symbol)                          !=   true
                  && PositionsTotal()                                 ==   0
               //ø--(+|COMMENTS:
               //ø--(+|PRICE ACTION VALUES@[HIGH]------------------(+|-----------------------------------------------------------------------------------------------------------------||
                  &&   iHigh(_Symbol,_Period,1)                       >=   iHigh(_Symbol,_Period,0)
               //ø--(+|END-ALL-SHORT-ENTRY-CONDITIONS--------------(+|-----------------------------------------------------------------------------------------------------------------||
                     )
                        {
                        {trade_description="SHORT-ENTRY";trade.Sell(lot,_Symbol,SymbolInfoDouble(_Symbol,SYMBOL_BID),NULL,NULL,NULL);Print(trade_description);}
                        }
            //+------------------------------------------------------------------+
            //| End Buy & Sell Trade Definitions                                 | 
            //+------------------------------------------------------------------+

      //+------------------------------------------------------------------+
      //| On Screen Display Information                                    |
      //+------------------------------------------------------------------+

         Comment(
            "\n",
            "\n",
            "\n",
            "             ||PositionGetString(POSITION_COMMENT)_____________== ",PositionGetString(POSITION_COMMENT),"\n",
            "             ||trade_description_______________________________== ",trade_description,"\n",
            "\n",
            "             ||iHigh(_Symbol,_Period,1)________________________== ",iHigh(_Symbol,_Period,1),"\n",
            "             ||iHigh(_Symbol,_Period,0)________________________== ",iHigh(_Symbol,_Period,0),"\n",
            "             ||SymbolInfoDouble(_Symbol,SYMBOL_BID)____________== ",SymbolInfoDouble(_Symbol,SYMBOL_BID),"\n",
            "\n",
            "             ||iLow(_Symbol,_Period,1)_________________________== ",iLow(_Symbol,_Period,1),"\n",
            "             ||iLow(_Symbol,_Period,0)_________________________== ",iLow(_Symbol,_Period,0),"\n",
            "             ||SymbolInfoDouble(_Symbol,SYMBOL_ASK)____________== ",SymbolInfoDouble(_Symbol,SYMBOL_ASK),"\n",
            "\n"
         );

//+------------------------------------------------------------------+
//| Expert OnTick function End                                       |
//+------------------------------------------------------------------+
  
  }
Introduction to MQL5: How to write simple Expert Advisor and Custom Indicator
Introduction to MQL5: How to write simple Expert Advisor and Custom Indicator
  • www.mql5.com
MetaQuotes Programming Language 5 (MQL5), included in MetaTrader 5 Client Terminal, has many new possibilities and higher performance, compared to MQL4. This article will help you to get acquainted with this new programming language. The simple examples of how to write an Expert Advisor and Custom Indicator are presented in this article. We will also consider some details of MQL5 language, that are necessary to understand these examples.
 
can someone please open a ticket with MT5 support?
Many Thanks!
 
cowmodee: can someone please open a ticket with MT5 support?

Open your own — bottom of every page is Contacts and requests

 
done. thank you.
 

If your EA (which stopped working) is the EA from this Market so read post:

AMP Future EA doesn't work anymore
AMP Future EA doesn't work anymore
  • 2021.01.21
  • www.mql5.com
hi, all I am having issue with my AMP future Account, my EA was working fine on MNQZ20 and MESH20 index future symbols and it works fine on MNQH21...