there is a russian forum https://www.mql5.comhttps://www.mql5.com/ru/ here is the english forum
zhoss: values obtained RightRise LeftRise and do not correspond to the price price1, price2
trend line for the respective time, what's the problem?
trend line for the respective time, what's the problem?
datetime time1 = Time [10]; price1 = Close [10]; datetime time2 = Time [0]; price2 = Close [0 ]; ObjectCreate ("trend_line", OBJ_TREND, 0, time1, price1, time2, price2); double RightRise = ObjectGetValueByTime (0, "trend_line", time2, 0); double LeftRise = ObjectGetValueByTime (0, "trend_line", time1, 0)
Perhaps using the MT4 call might work. https://docs.mql4.com/objects/objectgetvaluebytime | double ObjectGetValueByTime(string name, datetime time, int line_id); |
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Здравствуйте, многоуважаемые разработчики MQl4 !
После недавнего обновления обнаружил, что некорректно работает ф-я ObjectGetValueByTime в данном контексте:
datetime time1=Time[10];
datetime time2=Time[0];
price1=Close[10];
price2=Close[0];
ObjectCreate("trend_line",OBJ_TREND,0, time1, price1, time2, price2);
double RightRise=ObjectGetValueByTime(0,"trend_line",time2, 0);
double LeftRise=ObjectGetValueByTime(0,"trend_line",time1, 0);
полученные значения RightRise и LeftRise не соответствуют значениям цены price1 b price2 трендовой линии для соответствующих временных точек
Подскажите, в чем проблема? Очень нужно... Заранее спасибо!