Download MetaTrader 5

may we use arraycompare fuction to compare two structures ?

To add comments, please log in or register
yalewang
606
yalewang  

may we use ArrayCompare() fuction to compare two structures ?

if not ,is there functions to compare strucures ?

thanks .

fxsaber
6210
fxsaber  
yalewang:

if not ,is there functions to compare strucures ?

// MQL4&5-code

#property strict

#include <TypeToBytes.mqh> // https://www.mql5.com/ru/code/16280

void OnStart( void )
{
  MqlTick Tick;
  ::SymbolInfoTick(::Symbol(), Tick);

  MqlTick CloneTick = Tick;

// Operation with structures
  if (_R(Tick) == CloneTick)             // Now the structures can be compared

    ::Print("Equal");
}
TypeToBytes
TypeToBytes
  • votes: 19
  • 2016.09.19
  • fxsaber
  • www.mql5.com
Byte-wise operation with structures and standard data types.
whroeder1
15345
whroeder1  
yalewang: if not ,is there functions to compare strucures ?
You write them. See Sort multiple arrays - MQL4 and MetaTrader 4 - MQL4 programming forum
To add comments, please log in or register