Error on publishing EA - page 2

 
Sergey Golubev #:
It is your EA, so you should find the reason by yourself, because you only know what you did and what you did not.
We (on the forum) may provide just the general information about it.

I understand. But is there any other reasons this happens? Any other articles for this? 

 
Mohit Vijay Borse # Can you help me with the other error of no trading operations 

It's true, this first "there are no trading operations" error needs to be addressed. The EA cannot have restrictions on symbols, timeframes,... It must trade any symbol/timeframe, regardless of whether it will be profitable or not. In this case, it is not trading on EURUSD/H1. This needs to be addressed for the EA to pass automatic validation.

 
Mohit Vijay Borse #I understand. But is there any other reasons this happens? Any other articles for this? 

If your EA does not have symbol/timeframe restrictions, use the strategy tester, the best modeling available, on EURUSD/H1, to try to identify possible errors when opening positions.

 
Vinicius Pereira De Oliveira #:

It's true, this first "there are no trading operations" error needs to be addressed. The EA cannot have restrictions on symbols, timeframes,... It must trade any symbol/timeframe, regardless of whether it will be profitable or not. In this case, it is not trading on EURUSD/H1. This needs to be addressed for the EA to pass automatic validation.

i still cant figure it out. can you please help me?

 
Mohit Vijay Borse #i still cant figure it out. can you please help me?

When you run your EA in the strategy tester, is it opening a position on EURUSD/H1 ?

 
Mohit Vijay Borse #i still cant figure it out. can you please help me?

Have you read the following articles?

Articles

The checks a trading robot must pass before publication in the Market

MetaQuotes, 2016.08.01 09:30

Before any product is published in the Market, it must undergo compulsory preliminary checks in order to ensure a uniform quality standard. This article considers the most frequent errors made by developers in their technical indicators and trading robots. An also shows how to self-test a product before sending it to the Market.

Articles

How to publish a product on the Market

MetaQuotes, 2012.04.19 15:27

Start offering your trading applications to millions of MetaTrader users from around the world though the Market. The service provides a ready-made infrastructure: access to a large audience, licensing solutions, trial versions, publication of updates and acceptance of payments. You only need to complete a quick seller registration procedure and publish your product. Start generating additional profits from your programs using the ready-made technical base provided by the service.

 
Vinicius Pereira De Oliveira #:

Have you read the following articles?



yes i have read it. not helping. i only have that error of trading operations not perform. i can share my code can you help?

 
Mohit Vijay Borse #yes i have read it. not helping. i only have that error of trading operations not perform. i can share my code can you help?

Yes, if you share the code then it allows for better guidance.

 
Vinicius Pereira De Oliveira #:

Yes, if you share the code then it allows for better guidance.

Vinicius Pereira De Oliveira #:

Yes, if you share the code then it allows for better guidance.

Vinicius Pereira De Oliveira #:

Yes, if you share the code then it allows for better guidance.

#include <Trade\Trade.mqh> // Add this line to include the Trade library

input double lotSize = 0.01; // Default lot size

int Slowma = 100;
int Fastma = 55;
int SuperFastma = 40;
int extra1 = 70;
int extra2 = 25;
int extra3 = 12;

int handleExtra1;
int handleExtra2;
int handleExtra3;

input int TslTriggerPoints = 5000;
input int TslPoints = 10000;

input int Takeprofit  = 2000; // Takeprofit in points
input int Stoploss = 20000; // Stoploss in points

int handleSlowma;
int handleFastma;
int handleSuperFastma;

double FastMaArray[];
double SuperFastMaArray[];
double SlowMaArray[];

datetime Opentimebuy = 0 ;
datetime Opentimesell = 0 ;

CTrade Trade;

// Function declaration at global scope
bool CheckVolumeValue(double volume, string &description);

//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int OnInit()
{
   if(Slowma <= 0 || Fastma <= 0 || SuperFastma <= 0 || SuperFastma >= Fastma)
   {
      Alert("Invalid parameters: Slowma, Fastma, or SuperFastma");
      return INIT_PARAMETERS_INCORRECT;
   }

   handleFastma = iMA(_Symbol, PERIOD_CURRENT, Fastma, 0, MODE_EMA, PRICE_CLOSE);
   if(handleFastma == INVALID_HANDLE)
   {
      Alert("Failed to create Fastma");
      return INIT_FAILED;
   }

   handleSuperFastma = iMA(_Symbol, PERIOD_CURRENT, SuperFastma, 0, MODE_EMA, PRICE_CLOSE);
   if(handleSuperFastma == INVALID_HANDLE)
   {
      Alert("Failed to create SuperFastma");
      return INIT_FAILED;
   }

   handleSlowma = iMA(_Symbol, PERIOD_CURRENT, Slowma, 0, MODE_EMA, PRICE_CLOSE);
   if(handleSlowma == INVALID_HANDLE)
   {
      Alert("Failed to create Slowma");
      return INIT_FAILED;
   }
   handleExtra1 = iMA(_Symbol, PERIOD_CURRENT, extra1, 0, MODE_EMA, PRICE_CLOSE);
   if(handleExtra1 == INVALID_HANDLE)
   {
      Alert("Failed to create extra1");
      return INIT_FAILED;
   }
   handleExtra2 = iMA(_Symbol, PERIOD_CURRENT, extra2, 0, MODE_SMA, PRICE_CLOSE);
   if(handleExtra2 == INVALID_HANDLE)
   {
      Alert("Failed to create extra2");
      return INIT_FAILED;
   }
   handleExtra3 = iMA(_Symbol, PERIOD_CURRENT, extra3, 0, MODE_SMA, PRICE_CLOSE);
   if(handleExtra3 == INVALID_HANDLE)
   {
      Alert("Failed to create extra3");
      return INIT_FAILED;
   }

   ArraySetAsSeries(FastMaArray, true);
   ArraySetAsSeries(SuperFastMaArray, true);
   ArraySetAsSeries(SlowMaArray, true);

   return(INIT_SUCCEEDED);
}

//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
{
   if(handleSuperFastma != INVALID_HANDLE)
   {
      IndicatorRelease(handleSuperFastma);
   }
   if(handleFastma != INVALID_HANDLE)
   {
      IndicatorRelease(handleFastma);
   }
   if(handleSlowma != INVALID_HANDLE)
   {
      IndicatorRelease(handleSlowma);
   }
}

//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
{
    // Check if there's not enough free margin
    if (AccountInfoDouble(ACCOUNT_EQUITY) <= 0)
    {
        Print("Not enough money");
        return; // Exit the function early since there's not enough money
    }

   int values = CopyBuffer(handleSuperFastma, 0, 0, 2, SuperFastMaArray);
   if(values != 2)
   {
      Print("Not enough data for SuperFastma");
      return;
   }

   values = CopyBuffer(handleFastma, 0, 0, 2, FastMaArray);
   if(values != 2)
   {
      Print("Not enough data for Fastma");
      return;
   }

   values = CopyBuffer(handleSlowma, 0, 0, 3, SlowMaArray);
   if(values != 3)
   {
      Print("Not enough data for Slowma");
      return;
   }

   string description;
   if(!CheckVolumeValue(0.1, description))
   {
      Print("Volume check failed: ", description);
      return;
   }

   if (!TerminalInfoInteger(TERMINAL_TRADE_ALLOWED) && !MQLInfoInteger(MQL_TESTER))
   {
      Print("Trading is not allowed");
      return;
   }

   }
}

// Function definition at global scope
bool CheckVolumeValue(double volume, string &description)
{
   //--- minimal allowed volume for trade operations
   double min_volume = SymbolInfoDouble(Symbol(),SYMBOL_VOLUME_MIN);
   if(volume < min_volume)
   {
      description = StringFormat("Volume is less than the minimal allowed SYMBOL_VOLUME_MIN=%.2f", min_volume);
      return(false);
   }
   //--- maximal allowed volume of trade operations
   double max_volume = SymbolInfoDouble(Symbol(),SYMBOL_VOLUME_MAX);
   if(volume > max_volume)
   {
      description = StringFormat("Volume is greater than the maximal allowed SYMBOL_VOLUME_MAX=%.2f", max_volume);
      return(false);
   }

   //--- get minimal step of volume changing
   double volume_step = SymbolInfoDouble(Symbol(),SYMBOL_VOLUME_STEP);

   int ratio = (int)MathRound(volume/volume_step);
   if(MathAbs(ratio*volume_step-volume) > 0.0000001)
   {
      description = StringFormat("Volume is not a multiple of the minimal step SYMBOL_VOLUME_STEP=%.2f, the closest correct volume is %.2f",
                                 volume_step,ratio*volume_step);
      return(false);
   }
   description = "Correct volume value";
   return(true);
} here is the code. please see why the error
 
Mohit Vijay Borse #:

i have the removed the trading conditions of buy sell and for security reasons of the strategy

Reason: