Download MetaTrader 5

Wrong values returned from ObjectGetValueByTime

To add comments, please log in or register
Koos de Klerk
8
Koos de Klerk  

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