×

Sign up and get MultiCharts free

Use its powerful simulation mode with data included out of the box. Just fill out the form and start honing your trading skills with a few clicks.

RectangleGetFirst - MultiCharts
Open main menu

Returns a numerical value, indicating the rectangle ID number of the oldest (the first to be drawn on the current chart) rectangle of the specified origin; returns a value of -2 if the specified rectangle ID number is invalid.

Contents

Usage

RectangleGetFirst (Origin)

Parameters

Origin - a numerical expression specifying the origin of the rectangle:

1 - drawn by the current study
2 - drawn by a study other then the current study, or drawn manually by the user
3 - drawn by any study, or drawn manually by the user
4 - drawn by the current study, or drawn manually by the user
5 - drawn by a study other then the current study
6 - drawn by any study
7 - drawn manually by the user

Notes

If the oldest (the first to be drawn) rectangle is deleted, the next oldest (the second to be drawn) rectangle becomes the oldest (the first drawn) rectangle.

Example

Assign a value, indicating the rectangle ID number of the oldest rectangle drawn on the chart by the current study, to Value1 variable:

Value1=RectangleGetFirst(1);