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

Automated Trading Language Documentation

Linear Regression Channel Indicator
Linear Regression Channel
Author: mvv444
Subscribe to signal
Slow and steady trend trading 1
33.22%, 0.00 USD
Screenshot
GBPJPY, H4
Demo
Modified Awesome OscillatorModified Awesome Oscillator Try product
Modified Awesome Oscillator
Author: iTC
Creating a Multi-Currency Indicator, Using a Number of Intermediate Indicator Buffers Creating a Multi-Currency Indicator, Using a Number of...

Resize

Sets a new (smaller) size of the array.

bool  Resize(
   int  size      // Size
   )

Parameters

size

[in]  New size of the array.

Return Value

true if successful, false - if there was an attempt to set the size of less than or equal to zero.

Note

Changing the size of the array allows optimal use of memory.Superfluous elements on the right lost.To reduce fragmentation of memory, change the size of the array is made with a step previously given through the method of Step (int), or 16 (default).

Example:

//--- example for CArrayLong::Resize(int)
#include <Arrays\ArrayLong.mqh>
//---
void OnStart()
  {
   CArrayLong *array=new CArrayLong;
   //---
   if(array==NULL)
     {
      printf("Object create error");
      return;
     }
   //--- add arrays elements
   //--- . . .
   //--- resize array
   if(!array.Resize(10))
     {
      printf("Resize error");
      delete array;
      return;
     }
   //--- delete array
   delete array;
  }


Updated: 2010.02.09