Perhaps you should read the manual. What is the last parameter of the function, what value are you passing to it?
i want read the trend line value in every candles but all read result 0.0
i want read the trend line value in every candles but all read result 0.0
double LastUpRedrawValue =ObjectGetValueByTime(0,"Toptahlil_UpperTrendLine_"+GetPeriod(Period()),Time[iUp],0);i used this code but return value no change my result is 0.0 and my last error is 0 after call this function
double ObjectGetValueByTime( long chart_id, // chart ID string object_name, // object name datetime time, // time int line_id=0 // line ID );
mehdi khoshbakhtvash: i used this code but return 0.0 value mehdi khoshbakhtvash: i want read the trend line value in every candles but all read result 0.0
mehdi khoshbakhtvash: i used this code but return value no change my result is 0.0 and my last error is 0 after call this function |
|
Are you trying to say that the function is faulty?
Maybe you want to check your code again.
To get value by time after creating an object with a same script first you should use the function Sleep(). Put a program to sleep for at least 50 milliseconds. Though on my computer sometimes even 100 milliseconds is not enough.
Then you should use ChartRedraw().
Then you will get ObjectGetValueByTime() working correctly. Maybe.
So, to get this function work for some reason you need to wait undefined amount of time and use another function which makes no common sense and no guide is writing about it.
So, yeah. The function is faulty. The whole mt4 is faulty.
To get value by time after creating an object with a same script first you should use the function Sleep(). Put a program to sleep for at least 50 milliseconds. Though on my computer sometimes even 100 milliseconds is not enough.
Then you should use ChartRedraw().
Then you will get ObjectGetValueByTime() working correctly. Maybe.
So, to get this function work for some reason you need to wait undefined amount of time and use another function which makes no common sense and no guide is writing about it.
So, yeah. The function is faulty. The whole mt4 is faulty.
I removed your inflammatory post.
This is an MT5 topic.
I removed your inflammatory post.
This is an MT5 topic.
In my documentation it says that Mikhail Sobolev should be banned for a while for his language in the publication you removed from it.
You look very soft and cuddly today....
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
ObjectGetValueByTime()
All time retrun 0.0