Market: no trading operations - page 2

 
Vitaly Muzichenko:
And it never gets to this point

I don't understand why, but okay, how about this:

bool CheckVolumeValue(double volume)
{
   double min_volume=SymbolInfoDouble(Symbol(),SYMBOL_VOLUME_MIN);
   if(volume<min_volume)
   {
      Print("Volume is less than the minimum");
      return(false);
   }

   double max_volume=SymbolInfoDouble(Symbol(),SYMBOL_VOLUME_MAX);
   if(volume>max_volume)
   {
      Print("Volume is greater than the maximum");
      return(false);
   }

   double volume_step=SymbolInfoDouble(Symbol(),SYMBOL_VOLUME_STEP);

   int ratio=(int)MathRound(volume/volume_step);
   if(MathAbs(ratio*volume_step-volume)>0.0000001)
   {
      Print("Wrong lot size");
      return(false);
   }
     
   if(volume*MarketInfo(Symbol(),MODE_MARGINREQUIRED)>AccountEquity())
   {
      Print("Trade stop is not enough free margin to begin");
      Comment("Trade stop is not enough free margin to begin");
      return(false);
   }
   if(volume<MarketInfo(Symbol(),MODE_MINLOT))
   {
      Print("Trade stop invalid lot size");
      Comment("Trade stop invalid lot size"); 
      return(false);
   }
   return(true);
}

Here's the test:

   if(!CheckVolumeValue(lt))return;   
   if(!OrderSend(Symbol(),cmd,NormalizeDouble(lt,2),NormalizeDouble(priceStep,Digits()),Slippage,0,0,"",magic,0))

what's wrong?

now "no trading operation"!!!
 
Maksim Neimerik:

I don't understand why, but okay, how about this:

Here's the test:

what's wrong?

now "no trading operation"!!!
 
Renat Akhtyamov:
the weekend's about to go by and yeeeee-....

Do you think it has something to do with the weekend?

 
Maksim Neimerik:

I don't understand why, but okay, how about this:

Here's the test:

what's wrong?

now "no trading operation"!!!

If NOTHING has changed, then YES.

apparently the error code depends on the version (4 vs 5) and the current server release. They have the right to answer differently "listen, client - it's as you ask, I don't perform any action on the request and I have no right to say anything about the result".
There seems to be no action, but there is no result from it either - just a non-trading operation.

Документация по MQL5: Константы, перечисления и структуры / Коды ошибок и предупреждений
Документация по MQL5: Константы, перечисления и структуры / Коды ошибок и предупреждений
  • www.mql5.com
Константы, перечисления и структуры / Коды ошибок и предупреждений - справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
 
Maksim Neimerik:

Can anyone explain why the market returns this error? All the checks in the EA are in place...

I kinda get the gist of course - no trades, but for what reason?

Simply because there are none, no one has bought or sold anything. There's nothing to hook your trades on. The glass has not aligned.

 
Maksim Neimerik:

Do you think it has something to do with the weekend?

ahhh, are you pouring the product into Market?

it's just that no trades opened in the autotest in Market

As far as I remember, they test on all TFs

Run it in the tester then first
 
Renat Akhtyamov:

ahhh, are you pouring the product into Market?

I just didn't get any trades opened in the Market autotest

As far as I remember, they test on all TFs

Run it in the tester first.

Market is not a tester. They have their own rules there.
 
Vladislav Andruschenko:

The market is not a tester. They have their own rules.

I'm not arguing.

If they don't open in the tester, they don't open there either.

 
Renat Akhtyamov:

I'm not arguing.

If the tester won't open, neither will the tester

Yeah, everything works in the tester... I don't know what else to check.
 
Maksim Neimerik:
Yes everything works in the tester... I don't know what else to check.

an error listing is needed, in more detail

if possible

Reason: