Questions from Beginners MQL5 MT5 MetaTrader 5 - page 968

 
xxz:

Now that's what we need!

In those variants it came out either just a serial number orSIM_1,...etc.

You are asking questions about the fourth MT in the section for the fifth. If you don't output comments, then you have no #property strict directive at the beginning of mql4 code. Insert it and may the Jedi Force be with you.

 
Sprut112:
When testing a multi-currency EA the problem with the lot arises. I have a fixed 0.03, but during the test the orders with the volume of 0.1 appear. Immediately a failure appears on the chart. Is it just me?

I have several options:

  • You're using netting.
  • This is the shenanigans of Dem Frost :)
  • And traditionally: look for bugs in your code.
 
Vladimir Karputov:

I have several options:

  • You're using netting.
  • This is the shenanigans of Dem Frost :)
  • And traditionally: look for bugs in your code.

Yeah, I like that, okay it's not critical.

 
Artyom Trishkin:

You're asking questions about the fourth MT in the section for the fifth. If you don't get comments output, then you don't have #property strict directive at the beginning of your mql4 code. Insert it and may Jedi Force be with you.

Yes on mql4, but does it work differently in mt5?
Is it the same...

#property strict stands...

I wanted the result of the assignment to be a string result, not a sequence number

Or the name of the parameter itself...

 
xxz:

Yes on MT4, but in MT5 does it work differently?
the same...

#property strict stands...

I wanted to get a string result as a result of the assignment, not its sequence number

Or the name of the parameter itself...

Why doesn't it work as you want in mql4 with #property strict ?

Forum on trading, automated trading systems & strategy testing

Questions from beginners MQL5 MT5 MetaTrader 5

xxz, 2018.12.21 12:39

Thank you very much !

Because I tried it like this and it didn't work for me:

  enum  Symboll_
  {
   SIM_0,  //AUDUSD
   SIM_1,  //NZDUSD
   SIM_2,  //USDCAD
   SIM_3,  //USDCHF
   SIM_4,  //USDJPY
   SIM_5,  //EURJPY
   SIM_6,  //EURUSD
   SIM_7   //#CL
  };  

What is its so fundamentally different from the code shown to you by Vladimir:

Forum on Trading, Automated Trading Systems and Strategy Tests

Questions from Beginners MQL5 MT5 MetaTrader 5

Vladimir Karputov, 2018.12.21 12:33

There you go:

   enum MySymbol
     {
      symbol_0=0,// AUDUSD
      symbol_1=1,// NZDUSD
      symbol_2=2,// USDCAD
      symbol_3=3,// USDCHF
      symbol_4=4,// USDJPY
      symbol_5=5,// EURJPY
      symbol_6=6,// EURUSD
      symbol_7=7,// GBPUSD
      symbol_8=8,// #CL
     };
And there is no difference in these implementations. And there is only one reason for your code not to output text descriptions - it's the lack of #property strict in mql4 code.


 
Sprut112:
When testing a multi-currency EA, there is a problem with the lot size. I have a fixed 0.03, but during the test the orders appear with the volume of 0.1. Immediately a failure appears on the chart. Is it just me?

It trades normally in the tester, build 1960. What lot I put, that is what it takes on 12 pairs simultaneously

 
Konstantin Nikitin:

I'm trading normally in the tester, build 1960. What lot I put, that's what it takes on 12 pairs at the same time

I have 32 pairs so what. The moderator said there was a mistake in the code. But what mistake could there be? A fix lot is a fix as it is. There are no calculations.
 
Sprut112:
I have 32 pairs. The moderator said that there was an error in my code. But what kind of error may there be? A fix lot is a fix as it is.

And nothing. The question was.

Sprut112:
When testing the multicurrency EA there is a problem with the lot. I have a fixed 0.03, but during the test the orders appear with a volume of 0.1. Immediately a failure appears on the chart. Is it only me?

I showed you that I do not. It looks like you are actually looking at the code, or maybe you are dealing with some kind of restriction. This is all at the level of guessing by coffee grounds.
 
Sprut112:
I have 32 pairs, so what. The moderator said there was an error in the code. But what kind of error could there be, a fix lot is a fix in Africa, there are no calculations.

Look for the error, analyse the code, the logs. Don't forget the difference between netting and hedging. Remember that the position does not open instantly - you need control and so on and so forth.

 
Vladimir Karputov:

Look for the error, analyse the code, the logs. Don't forget the difference between netting and hedging. Remember that the position does not open instantly - you need control and so on and so forth.

The Expert Advisor trades on a hedge. Maybe some checks should be added as standard?