Support

Equilla Formula Language

ToolSetStyle

Sets the line style of a trendline.

Inputs

ToolID
Numeric: A tool identifier that has been previously returned by the DrawTrendline function.
Style
Numeric: The new style of the trendline.

Remarks

This function is available for trendlines only.

Line Styles

StyleSolid Draws a solid line.
StyleDash Draws a dashed line.
StyleDot Draws a dotted line.
StyleDashDot Draws a dashed and dotted line.
StyleDashDotDot Draws a dash dot dot line.

Examples

Show the current price as horizontal line over the last 10 bars
Variables: id, style; id = ToolGetFirst(); If id = -2 Then // Create the trendline DrawTrendline( DateTime[10], Close, DateTime, Close ) Else Begin If BarStatus = BarStatusClosingTick Then style = StyleSolid Else style = StyleDot; If ToolGetStyle( id ) <;>; style Then ToolSetStyle( id, style ); ToolSetStart( id, DateTime[10], Close ); ToolSetEnd( id, DateTime, Close ); End;