Help me, ObjectCreate with OBJ_HLINE

 
Hi All,
I am newbie in MQL4,

I write the code like this :slight_smile:

double dHarga=iClose(NULL,PERIOD_D1,1);

string Rem,desc1;
Rem="test hline";
ObjectCreate(Rem,OBJ_HLINE,0,0,0,0,0);
ObjectSet(Rem,OBJPROP_PRICE1,dHarga);

I got the correct value dHarga=1.16457.

But I confuse about the label which mt4 draws , the result is different. which is 1.16438.

I want to know the function which result 1.16438. I already try ObjectGetShiftByValue and ObjectGet without success.

I want to know how to get 1.16438.

Many thanks before

Hans
Files:
Clipboard01.jpg  116 kb
 

I don't know why, but hovering the mouse over an object to get the pop-up value often shows the wrong value.

However, retrieving the value with code will always return the correct value (1.16457)

 
Keith Watford:

I don't know why, but hovering the mouse over an object to get the pop-up value often shows the wrong value.

However, retrieving the value with code will always return the correct value (1.16457)

I see, maybe, it is bug in mt4 chart.

Thx for reply Keith Watford

 
Keith Watford: I don't know why, but hovering the mouse over an object to get the pop-up value often shows the wrong value.
What it shows is the price the mouse is pointing to, not the indicator or candle value.
 
whroeder1:
What it shows is the price the mouse is pointing to, not the indicator or candle value.

Forum on trading, automated trading systems and testing trading strategies

Modify error 130 in small TimeFrame

Alain Verleyen, 2017.07.26 17:11

Please take into account my advice about using html table uselessly.


 
Keith Watford:

I don't know why, but hovering the mouse over an object to get the pop-up value often shows the wrong value.

However, retrieving the value with code will always return the correct value (1.16457)


whroeder1:
What it shows is the price the mouse is pointing to, not the indicator or candle value.

Not in my experience. Hover the mouse just above or just below a horizontal line and the pop up will show the same value even though the mouse is pointing at different values.

I don't know why you are referring to an indicator or candle value as this topic is discussing the value of a horizontal line.

Reason: