Market Profile Buffers

Market Profile Buffers

15 February 2022, 22:33
Kyra Nickaline Watson-gordon
0
561

Market Profile Indicator


MT4 Version : Market Profile iMT4

MT5 Version : Market Profile iMT5

Some Pre-Built Templates



Buffers for Developers :

This is the manual and code snippets for calling buffers of Market Profile indicator.


Available buffers :

Buffer Index
Shift Value
 Description
0
0 ~ n-1
Value Area Low
1
0 ~ n-1
Value Area High
2
0 ~ n-1
Point of Control
3
0 ~ n-1
Profile Low
4 0 ~ n-1 Profile High
 5 0 ~ n-1  Profile Open
 6 0 ~ n-1  Profile Close
 7 0 ~ n-1  Initial Balance Low
 8 0 ~ n-1  Initial Balance Low
 9 0 ~ n-1  Number of Rows on Profile
 10 0 ~ n-1  Start Time of Profile
 11 0 ~ n-1  End Time of Profile
12
0 ~ m-1 Price Arrays of Latest Profile
13
0 ~ m-1  Values of Latest Profile

Notes :

- n = Number of Profiles (Equal to Number of Histograms on the inputs)

- m = Number of Rows on Latest Profile (Equal to Buffer No.9)

- Profile Specifications are available for all profiles. But the detailed values (Price arrays and values on each price level) is available for latest profile only.

Examples and Code Snippets :


Calling Profile Specifications for index=n (MT4) :

VAL=iCustom(Symbol(),Period(),"Market\\Market Profile iMT4",.....inputs......,0,n);
VAH=iCustom(Symbol(),Period(),"Market\\Market Profile iMT4",.....inputs......,1,n);
POC=iCustom(Symbol(),Period(),"Market\\Market Profile iMT4",.....inputs......,2,n);
HistoLow=iCustom(Symbol(),Period(),"Market\\Market Profile iMT4",.....inputs......,3,n);
HistoHigh=iCustom(Symbol(),Period(),"Market\\Market Profile iMT4",.....inputs......,4,n);
HistoOpen=iCustom(Symbol(),Period(),"Market\\Market Profile iMT4",.....inputs......,5,n);
HistoClose=iCustom(Symbol(),Period(),"Market\\Market Profile iMT4",.....inputs......,6,n);
HistoIBL=iCustom(Symbol(),Period(),"Market\\Market Profile iMT4",.....inputs......,7,n);
HistoIBH=iCustom(Symbol(),Period(),"Market\\Market Profile iMT4",.....inputs......,8,n);
m=iCustom(Symbol(),Period(),"Market\\Market Profile iMT4",.....inputs......,9,n);
StartTime=(datetime)iCustom(Symbol(),Period(),"Market\\Market Profile iMT4",.....inputs......,10,n);

EndTime=(datetime)iCustom(Symbol(),Period(),"Market\\Market Profile iMT4",.....inputs......,11,n);


Calling Latest Profile Values (MT4) :

m=iCustom(Symbol(),Period(),"Market\\Market Profile MT4",.....inputs......,9,0);

for( i=0; i<m; i++)
{
    Price[i]=iCustom(Symbol(),Period(),"Market\\Market Profile iMT4",.....inputs......,12,i);
    Value[i]=iCustom(Symbol(),Period(),"Market\\Market Profile iMT4",.....inputs......,13,i);
}


Calling Profile Specifications (MT5) :

int handleMP=iCustom(Symbol(),Period(),"Market\\Market Profile iMT5",.....inputs......);
if( handleMP==INVALID_HANDLE ) Print("Invalid Handle for Indicator. Err : ",GetLastError());

int nbuf;

nbuf=CopyBuffer(handleMP,0,0,n,VAL);           if( nbuf!=n ) Print("Copy Buffer Err : ",GetLastError());
nbuf=CopyBuffer(handleMP,1,0,n,VAH);           if( nbuf!=n ) Print("Copy Buffer Err : ",GetLastError());
nbuf=CopyBuffer(handleMP,2,0,n,POC);           if( nbuf!=n ) Print("Copy Buffer Err : ",GetLastError());
nbuf=CopyBuffer(handleMP,3,0,n,HistoLow);      if( nbuf!=n ) Print("Copy Buffer Err : ",GetLastError());
nbuf=CopyBuffer(handleMP,4,0,n,HistoHigh);     if( nbuf!=n ) Print("Copy Buffer Err : ",GetLastError());
nbuf=CopyBuffer(handleMP,5,0,n,HistoOpen);     if( nbuf!=n ) Print("Copy Buffer Err : ",GetLastError());
nbuf=CopyBuffer(handleMP,6,0,n,HistoClose);    if( nbuf!=n ) Print("Copy Buffer Err : ",GetLastError());
nbuf=CopyBuffer(handleMP,7,0,n,HistoIBL);      if( nbuf!=n ) Print("Copy Buffer Err : ",GetLastError());
nbuf=CopyBuffer(handleMP,8,0,n,HistoIBH);      if( nbuf!=n ) Print("Copy Buffer Err : ",GetLastError());
nbuf=CopyBuffer(handleMP,9,0,n,m);             if( nbuf!=n ) Print("Copy Buffer Err : ",GetLastError());
nbuf=CopyBuffer(handleMP,10,0,n,StartTime);    if( nbuf!=n ) Print("Copy Buffer Err : ",GetLastError());
nbuf=CopyBuffer(handleMP,11,0,n,EndTime);      if( nbuf!=n ) Print("Copy Buffer Err : ",GetLastError());


Calling Latest Profile Values (MT5) :

int handleMP=iCustom(Symbol(),Period(),"Market\\Market Profile iMT5",.....inputs......);
if( handleMP==INVALID_HANDLE ) Print("Invalid Handle for Indicator. Err : ",GetLastError());

int nbuf;

nbuf=CopyBuffer(handleTPO,9,0,1,mbuf);         if( nbuf!=1 ) Print("Copy Buffer Err : ",GetLastError());

m=mbuf[0];

nbuf=CopyBuffer(handleMP,12,0,m,Price);      if( nbuf!=m ) Print("Copy Buffer Err : ",GetLastError());

nbuf=CopyBuffer(handleMP,13,0,m,Value);      if( nbuf!=m ) Print("Copy Buffer Err : ",GetLastError());



Contact FxBestTools for more help and guidance.

Explore FxBestTools All Products.


Share it with friends: