Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1167

 

Can structures be compared in this way?

(MqlTick != MqlTick)
 
BillionerClub:

Can structures be compared in this way?

Just give it a try.

 
BillionerClub:

Can structures be compared in this way?

no

 
Artyom Trishkin:

Just give it a try.

Says it's illegal, no explanation as to why.

 
BillionerClub:

It says it is illegal, without explaining why.

What are you doing there? You can't see the code.

In the example given in your question you are comparing type to type:

(MqlTick != MqlTick)
 
BillionerClub:

It says it's illegal, no explanation as to why.

Well, it takes 30 seconds to check. It would have been checked a long time ago:

   MqlTick tick1={0};
   MqlTick tick2={0};
   if(tick1!=tick2)
     {
      Print("!!!");
     }

You'd get an error, and then you'd compare them piece by piece.

 

In the cup the trades go as N/A with 346 volume, I check in other terminals there were purchases of 346 contracts. Does it only depend on the broker?

 
How do I open a graph with the selected template?
 
Given:
Some WT class in which one of the functions in the for loop fills array xz[ ].
I need to get all these values of array xz[ ] sequentially in expert variable "yk" as in the for loop in the function of the WT class.
I declared a public variable "double revers" in the WT class, where I assigned values of the array xz[ ] in the for loop, i.e.
revers = xz[i]; and then I declared object of WT type sd in Expert Advisor and tried to get values of array xz[ ] using sd.revers, but got
only one value of this array, apparently the last one.
Question: how to get all array values in expert.
The Expert Advisor is executed in onTimer.
 
Alexander:
Given:
Some WT class in which one of the functions in the for loop fills the array xz[ ].
The Expert Advisor needs to get all these values of array xz[ ] in variable "yk" as a for loop in function of WT class.
I declared a public variable "double revers" in the WT class, where I assigned values of the array xz[ ] in the for loop, i.e.
revers = xz[i]; and then I declared object of WT type sd in Expert Advisor and tried to get values of array xz[ ] using sd.revers, but got
only one value of this array, apparently the last one.
Question: how to get all array values in expert.
The Expert Advisor is executed in onTimer.

What for is the variable reversed, if you can get the values directly from the array? And how do you imagine storing an array in a variable?

Make the array public and read it sd.xz[i]

Reason: