Market: no trading operations - page 5

 
Alexey Viktorov:

Did I miss it or didn't anyone specify what you mean by multicurrency EA?

Is it possible to call an EA that can only trade on the currency pair it is placed on multicurrency, even if it can trade on different pairs?

How can we talk about multicurrency in the MT4 tester?

Well, I have a multi-currency EA that is placed on one chart and trades several symbols, the code is the same for both platforms. But if I run it in the mt4 tester, it trades one pair and if I run it online, it trades all pairs. The conditions are written there.

 
Vitaly Muzichenko:

Well my multicurrency is the thing that is put on one chart and trades several symbols, the code is the same for both platforms. But if you run it in the mt4 tester, it trades one pair, and if you run it online, it trades all pairs. The conditions are prescribed there.


So there should be no problem with it then.

I do not have a problem with this, it is the same multicurrency, it passes the test.

And no trading activity may be in the tester's mood :-) - I don't know if he is in good mood (i.e. refreshing, sleeping, having a day off), but he may be in a bad mood.

It is enough to try a different spread or wait a day and it skips everything again in the mood.

 
Vladislav Andruschenko:


Well, there shouldn't be a problem with that then.

the same multicurrency, passes the test.

And no trading operation may be from the tester's mood :-) - I don't know if he is in a bad mood (i.e. refreshing, sleeping, having a day off) and he doesn't make any trade.

I try another spread or wait one day and it skips everything in the mood again.

Making my 10th attempt, reducing the checks in the code. So far with no results, of course there are a lot of checks - I think I disabled all of them

 
Vitaly Muzichenko:

This is the 10th attempt, reducing the checks in the code. So far with no results, of course there are a lot of checks - I think I've turned them all off

Have you tried changing spread and pair?

checks from the article on the website?
 
Vladislav Andruschenko:

Have you tried changing spread and pair?

How can I check the checks from the article on the website?

So far that's all, nothing has gone, I have prescribed the lot directly in OrderSend(...)

I will make a separate file with minimal functionality and will try to add it, thereby I will find the problem area, otherwise I will break a working EA by cutting out pieces)

 
Vitaly Muzichenko:

For now that's all, nothing worked, I wrote the lot directly in OrderSend(...)

I will make a separate file with minimal functionality and will try to add it, thereby I will find the problem area, otherwise I will break a working EA by cutting out pieces)

Here. Here. I've done the same thing before. Cut out pieces. Broke it and forgot what I'd done. And it turned out that the tester was just not in the mood. )))
 
Vitaly Muzichenko:

Well my multicurrency is the thing that is put on one chart and trades several symbols, the code is the same for both platforms. But if you run it in the mt4 tester, it trades one pair, and if you run it online, it trades all pairs. The conditions are prescribed there.

I was asking about Maxim's EA.

I think that in the near future this question should be asked every time there is the word 'multicurrency'... Because many people think that multicurrency EA can be placed on any currency pair and it will trade...

 
Evgeny Belyaev:

If the lot is less than the minimum allowed, then we will equate the lot to the minimum allowed. Respectively, if it is bigger, EA will trade with a bigger lot.

No tester \tester checks are needed.

And do not forget all other checks. Margin, normalization...

Vitaliy pointed out your error long time ago, but instead of finding the error you're just ranting.

If you take the simple EA on position opening, it may slap an order on every tick. You do not need any other trading logic. Check all of your check functions. If it passes the check, all is ok, if it fails, check each line of code. It should be understood that the validator can set any lot in the settings as 0 or negative, in this case, if there is enough margin, the bot should perform trades during testing.

PS It is advisable to check on the MQ server, as the validator checks on that server.
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);
}
if(!CheckVolumeValue(lt))return;   
   if(!OrderSend(Symbol(),cmd,NormalizeDouble(lt,2),NormalizeDouble(priceStep,Digits()),Slippage,0,0,"",magic,0))

You probably didn't notice, I used to show the validator - didn't pass the test...

added

 if(IsTesting())lоt=SymbolInfoDouble(Symbol(),SYMBOL_VOLUME_MIN);

Got it:

Automated product testing successfully completed:

The version test has passed successfully. You can now submit it for moderator verification.

So what were you talking about there...?

 
Alexey Viktorov:

I was asking about Maxim's EA.

I think that in the near future this question should be asked every time there is the word 'multicurrency'... Because many people think that multicurrency EA may be placed on any currency pair and it will trade...

I have a netizen at all, never a multi-currency, I didn't write such a thing...

 
Maksim Neimerik:

I'm a netizen at all, never a mumtivist, I didn't write such a thing...

That's great. I didn't read that either. So it's an imperialist plot))))

Reason: