I wrote the simplest of indicators (see below). It basically overlays the price
curve I selected (via PRICE_OPEN, PRICE_CLOSE, PRICE_HIGH, PRICE_LOW) over the
bar chart on the chart window. To my surprise, PRICE_OPEN maps to the Low end of
the main bar, OPEN_CLOSE maps to Open bar on the left side of the main bar, OPEN_LOW
maps to Close bar to the right of the main bar. OPEN_HIGH seems to be the only
one that maps correctly to the top of the main bar. See my pics below.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
I wrote the simplest of indicators (see below). It basically overlays the price curve I selected (via PRICE_OPEN, PRICE_CLOSE, PRICE_HIGH, PRICE_LOW) over the bar chart on the chart window. To my surprise, PRICE_OPEN maps to the Low end of the main bar, OPEN_CLOSE maps to Open bar on the left side of the main bar, OPEN_LOW maps to Close bar to the right of the main bar. OPEN_HIGH seems to be the only one that maps correctly to the top of the main bar. See my pics below.
Does anyone know what’s going on?
My simple indicator...............................
#property indicator_chart_window
#property indicator_buffers 1
#property indicator_color1 Yellow
double ExtMap_Indicator[];
int init()
{
//---- indicators
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(0,ExtMap_Indicator);
SetIndexEmptyValue(ExtMap_Indicator, EMPTY_VALUE);
//----
return(0);
}
int deinit()
{
//----
//----
return(0);
}
int start()
{
//----
ArrayCopySeries(ExtMap_Indicator, PRICE_HIGH, NULL, 0);
//----
return(0);
}