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

To add comments, please log in or register
Pipillioniare
72
Pipillioniare  

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,           ...
Pipillioniare
72
Pipillioniare  
can someone please help me
Mohamad Zulhairi Baba
16377
Mohamad Zulhairi Baba  
Pipillioniare:
can someone please help me

hire a freelancer.

Pipillioniare
72
Pipillioniare  
Mohamad Zulhairi Baba:

hire a freelancer.

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

To add comments, please log in or register