Support

Equilla Formula Language

DrawPriceMarker

Draws a horizontal marker at the given price next to the price scale or aligned to the last bar.

Inputs

Price1
Numeric: Specifies the price level to draw the marker at.
Price2
Numeric: (Optional) Additional price, if this differs from Price1 a rectangle will be drawn.
Width
Numeric: (Optional) The marker's relative width in percent. The default value is 5%.
FillColor
Color: (Optional) The color to fill the marker with or a gradient.
BorderColor
Color: (Optional) The marker's border color.
BorderThickness
Numeric: (Optional) The thickness of the border in pixels, 0 for no border.
Alignment
Numeric: (Optional) The marker's alignment, see below.
Label
String: (Optional) A text label to draw near the marker.
LabelSize
Numeric: (Optional) The size of the text label to draw, if omitted, an 8 point font will be used.
LabelColor
Color: (Optional) The color of the label, if omitted uses the frame color.
LabelOptions
Numeric: (Optional) Formatting flags for the label. One or more of the following (joined by plusses): Bold, Italic, Underline, Strikeout, AlignLeft, AlignRight, AlignTop, AlignBottom, Wingdings, Border, Opaque.

Remarks

Price markers will only be drawn on the last bar of a chart. Additionally price markers are only valid for one evaluation run, if an update occurs all existing price markers will be deleted.

In contrast to the other drawing functions, DrawPriceMarker does not procude series data. Therefore the output from this function can not be used from client scripts.

Price markers are always drawn behind any other chart.

Marker Alignments

PriceMarkerAlignBarCenter The marker is drawn in the middle of the bars range.
PriceMarkerAlignBarLeft The marker is drawn from the bars left border to the right.
PriceMarkerAlignBarRight The marker is drawn from the bars right border to the left.
PriceMarkerAlignAxis The marker is drawn from the value axis into the chart. This is the default value.

Text Styles

AlignCenter Aligns the text in the center horizontally and vertically.
Italic Draws italic text.
Bold Draws bold text.
Underline Underlines the text.
StrikeOut Stikes-out the text.
AlignLeft Aligns the text to the left.
AlignTop Aligns the text to the top.
AlignBottom Aligns the text to the bottom.
Wingdings Uses the wingdings font instead of normal characters.
Border Draws a border around the text.
Opaque Draws the text in an opaque manner enabling it to overwrite its background.

Examples

Draw a horizontal line at the current price covering the whole chart
DrawPriceMarker( Close, Close, 100 );
Mark the high/low range of the current bar
DrawPriceMarker( High, Low, 100, ColorOrange, Black, 1, PriceMarkerAlignBarCenter );
Draw markers for all stop and limit order active on the current bar
Meta: SubChart( False ); Variables: order, price, type, extent( 10 ); If IsLastBar Then Begin For order = 1 To GetActiveOrderCount Begin price = GetActiveOrderPrice( order ); type = GetActiveOrderType( order ); If type = OrderTypeLimit Then DrawPriceMarker( price, price, extent, Blue, Blue ) Else If type = OrderTypeStop Then DrawPriceMarker( price, price, extent, Red, Red ); End; End;