Author: Copyright 2006-2012, Alex Sergeev
Price Data Components
Series array that contains open prices of each barSeries array that contains close prices for each bar
2 Views
0 Downloads
0 Favorites
MemMap
//+------------------------------------------------------------------+
//|                                                           MemMap |
//|                                 Copyright 2006-2012, FXmaster.de |
//|       programming & support - Alex Sergeev (profy.mql@gmail.com) |
//+------------------------------------------------------------------+
#property copyright "Copyright 2006-2012, Alex Sergeev"
#property link      "www.FXmaster.de"
#property version   "1.00"
#include <MemMapLib.mqh>
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
   CMemMapFile hmem;
   int err=hmem.Open("Local\\test",111,modeCreate);

   uchar data[];
   StringToCharArray("Hello from MQL5!",data);
   err=hmem.Write(data,ArraySize(data));

   ArrayInitialize(data,0);
   hmem.Seek(0,SEEK_SET);
   err=hmem.Read(data,ArraySize(data));
   Print(CharArrayToString(data));

   hmem.Close();
  }
//+------------------------------------------------------------------+

Comments