RectangleSetBegin DT

From MultiCharts
Jump to navigation Jump to search

Modifies the starting point location of a rectangle with the specified ID number; returns a value of 0 if the starting point location was successfully modified, and a value of -2 if the specified rectangle ID number is invalid.
Of the two end points of a rectangle, the point with the earlier date and time is always considered to be the starting point; if the rectangle is vertical, the point with the lower price value is considered to be the starting point.
Instead of separate Date and Time values, a single DateTime value is used. It allows accessing millisecond time stamps of the bar.

Usage

RectangleSetBegin_DT (ID, b_DateTime, b_Price);
Parameters
ID - a numerical expression specifying the rectangle ID number
b_DateTime - a numerical expression specifying the rectangle starting point date and time; is indicated in the DateTime format. The integer portion of the DateTime value indicates the number of days that have elapsed since January 1st, 1900, and the fractional portion of the DateTime value indicates the fraction of the day that has passed since midnight.
b_Price - a numerical expression specifying the rectangle starting point price value (vertical position, corresponding to a value on the price scale of a chart)

Notes

A rectangle-specific ID number is returned by RectangleNew_DT when the rectangle is created.

Example

Set the beginning point of rectangle with ID = value 1 to open price 100 bars back

RectangleSetBegin_DT(value1,DateTime[100],Open[100]);