RectangleNew DT

From MultiCharts
Jump to navigation Jump to search

Displays a rectangle, with the specified starting and ending points, on the chart that the study is based on; returns a rectangle-specific ID number, required to modify the rectangle.

Instead of separate Date and Time values, a single DateTime value is used. It allows accessing millisecond time stamps of the bar.

Usage

RectangleNew_DT (b_DateTime, b_Price, e_DateTime, e_Price);

Parameters

  • 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)
  • e_DateTime - a numerical expression specifying the rectangle ending point time; the date is indicated in the DateTime format
  • e_Price - a numerical expression specifying the rectangle ending point price value

Example

Display a trendline that will connect a close price 100 bars back with the current close price.

Value1=RectangleNew_DT(DateTime[100],Close[100],DateTime,Close); 

if Value1 <> Value1[1] then RectangleDelete(Value1[1]);