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

Automated Trading Language Documentation

How to Post a Product in the Market How to Post a Product in the Market Screenshot
EURUSD, M5
Demo
Subscribe to signal
Strategy ULYSSES
201.04%, 1 024.39 USD
Trajecta Labs Strategy Builder FREETrajecta Labs Strategy Builder FREE Try product
Trajecta Labs Strategy Builder FREE
Author: figurelli
OzFX_D1_IndAES_v1.0 Indicator
OzFX_D1_IndAES_v1.0
Author: GODZILLA

Exchange

Changes elements of the list seats.

bool  Exchange(
   CObject*  node1,     // List item
   CObject*  node2      // List item
   )

Parameters

node1

[in] List item

node2

[in] List item

Return Value

true if successful, false - if you can not change the elements in some places.

Example:

//--- example for CList::Exchange(CObject*,CObject*) 
#include <Arrays\List.mqh> 
//--- 
void OnStart() 
  { 
   CList *list=new CList; 
   //--- 
   if(list==NULL
     { 
      printf("Object create error"); 
      return
     } 
   //--- exchange 
   list.Exchange(list.GetFirstNode(),list.GetLastNode()); 
   //--- use list 
   //--- . . . 
   //--- delete list 
   delete list; 
  } 


Updated: 2010.02.09