MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal

Automated Trading Language Documentation

SinTrend Indicator
SinTrend
Author: GODZILLA
Advanced Adaptive Indicators Theory and Implementation in MQL5 Advanced Adaptive Indicators Theory and Implementation in... Subscribe to signal
LongTermFx
24.60%, 2 454.89 EUR
Screenshot
GOLD, MN1
Demo
PnF ChartPnF Chart Try product
PnF Chart
Author: markon

CompareArrayconst

Compares array with another array.

bool  CompareArrayconst(
   const CArrayLong*  src      // Pointer to the source
   ) const

Parameters

src

[in]  Pointer to an instance of class CArrayLong-source elements for comparison.

Return Value

true if arrays are equal, false - if not.

Example:

//--- example for CArrayLong::CompareArray(const CArrayLong*)
#include <Arrays\ArrayLong.mqh>
//---
void OnStart()
  {
   CArrayLong *array=new CArrayLong;
   //---
   if(array==NULL)
     {
      printf("Object create error");
      return;
     }
   //--- create source array
   CArrayLong *src=new CArrayLong;
   if(src==NULL)
     {
      printf("Object create error");
      delete array;
      return;
     }
   //--- add source arrays elements
   //--- . . .
   //--- compare with another array
   int result=array.CompareArray(src);
   //--- delete arrays
   delete src;
   delete array;
  }


Updated: 2010.02.22