Support

Equilla Formula Language

ToolSetFlags

Sets the flags for an existing tool.

Inputs

ToolID
Numeric: A tool identifier that has been previously returned by one of the DrawTrendline or DrawRectangle functions.
Flags
Numeric: Any combination of flags valid for the specified tool.

ToolFlags

ToolExtendLeft The tool is expanded into the past.
ToolExtendRight The tool is expanded into the future.
ToolExtendTop The tool is expanded to the top of the chart. This flag is supported by the rectangle tool, only.
ToolExtendBottom The tool is expaned to the bottom of the chart. This flag is supported by the rectangle tool, only.
ToolDrawInBackground The tool is drawn into the background of the chart.
ToolDrawInForeground The tool is drawn on top of the chart.
ToolBorder A border is drawn around the tool. This flag is supported by the rectangle tool, only.
ToolEngulfLeft The rectangle is drawn to the left border of the bars column rather than to its center.
ToolEngulfRight The rectangle is drawn to the right border of the bars column rather than to its center.
ToolEngulfing The rectangle is drawn to the left and right borders of the corresponding bars columns.

Examples

Draw a horizontal line at the current price
Variables: flags, id; If IsLastBar Then Begin // Delete any existing tool While ( ToolGetFirst() <;>; -2 ) ToolDelete( ToolGetFirst() ); // Draw a horizontal line id = DrawTrendline( DateTime[1], Close, DateTime, Close, StyleSolid, 1, ColorGreen, ToolDrawInBackground + ToolExtendLeft ); // Set the extend to right flag of the new trendline ToolSetFlags( id, ToolGetFlags( id ) Or ToolExtendRight ); End;