Download MetaTrader 5

Wrong values returned from ObjectGetValueByTime

To add comments, please log in or register
Are you used to trading from your smartphone? Mobile version of MetaTrader 5 will suit you best!
Koos de Klerk
8
Koos de Klerk 2013.02.17 15:13 

I'm getting the wrong values returned from the function ObjectGetValueByTime.

First I create the object with: ObjectCreate(0, DivName, OBJ_STDDEVCHANNEL, 0, fromDate, fromPrice, toDate, toPrice);

Then I try to get the first value with: double FirstPrice0 = ObjectGetValueByTime(0, DivName, fromDate, 0); Everytime I run the EA, I get a different result without changing anything, all wrong values.

 

What am I doing wrong?

Documentation on MQL5: Standard Constants, Enumerations and Structures / Objects Constants / Object Types
Documentation on MQL5: Standard Constants, Enumerations and Structures / Objects Constants / Object Types
  • www.mql5.com
Standard Constants, Enumerations and Structures / Objects Constants / Object Types - Documentation on MQL5
To add comments, please log in or register