MQL5 Syntax problems. How to draw a simple trendline???

 

Hey guys,

at the moment I need to learn MQL5 and I have big problems with things which were so easy using MQL4.

I have no idea how to write the time1, time2, price1 and price2 values for the trendline. With MQL4 I simply used

ObjectCreate(0, "test", OBJ_TREND, 0, Time[5], High[5], Time[1], High[1]);

and that was all. Unfortunately I haven't found a single example how to do this with MQL5. There is no High[], Low[], Time[] anymore and I don't know how to do it.

Help is very appreciated!

 
There are no such predefined variables in MT5. Use the mql4_to_mql5 include file at MT4Orders library which defines iTime(...) and iHigh(...)
 
whroeder1:
There are no such predefined variables in MT5. Use the mql4_to_mql5 include file at MT4Orders library which defines iTime(...) and iHigh(...)

Thank you!