OBJ_TREND is an MQL4 graphical object representing a Trend Line. It supports the OBJPROP_RAY_RIGHT property for rightward continuation. Key functions include:

  • TrendCreate: Creates a trend line with specified coordinates, color, style, width, background, selection, ray continuation, hidden status, and Z-order.
  • TrendPointChange: Modifies an anchor point of an existing trend line.
  • TrendDelete: Removes a trend line from the chart.
  • ChangeTrendEmptyPoints: Sets default coordinates for trend line anchor points if not provided.
  • Input parameters for creating a trend line via script include name, anchor point percentages (date and price), color, style, width, background, selection, ray right, hidden, and Z-order.