How can I draw a trend line EA that simple joins the highest points of every candle from after the first six hours of a day

 

I want to write an EA that joins the highest points of each candle using a trend line (after the first six hours of a day). I saw the the documentation for the trend line (https://docs.mql4.com/constants/objectconstants/enum_object/obj_trend).

This is what I've done:

ObjectCreate(chart_ID,name,OBJ_TREND,sub_window,time1,price1,time2,price2)

ObjectSetInteger(chart_ID,name,OBJPROP_COLOR,clr);
ObjectSetInteger(chart_ID,name,OBJPROP_STYLE,style);
ObjectSetInteger(chart_ID,name,OBJPROP_WIDTH,width);
ObjectSetInteger(chart_ID,name,OBJPROP_RAY,false);

I know I am suppose to iterate through the highest value for each candle and get it's time, but I'm not sure how to go about this. How can this be done?
 

OBJ_TREND - Object Types - Objects Constants - Constants, Enumerations and Structures - MQL4 Reference
OBJ_TREND - Object Types - Objects Constants - Constants, Enumerations and Structures - MQL4 Reference
  • docs.mql4.com
The following script creates and moves the trend line on the chart. Special functions have been developed to create and change graphical object's properties. You can use these functions "as is" in your own applications. //| Create a trend line by the given coordinates                     |               time1=0,           ...
 
can someone please help me
 
Pipillioniare:
can someone please help me

hire a freelancer.

 
Mohamad Zulhairi Baba:

hire a freelancer.

I've asked for help to solve a particular problem.