Difference between revisions of "EntryDateTime Checked"

From MultiCharts
Jump to navigation Jump to search
(Created page with "Returns a double-precision decimal DateTime value indicating the date and time of initial entry into the specified position. The integer portion of the DateTime value indicate...")
 
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
Returns a double-precision decimal DateTime value indicating the date and time of initial entry into the specified position. 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. DateTime is a floating point value with high precision. It allows accessing millisecond time stamps of the bar.
+
Returns a double-precision decimal DateTime value indicating the date and time of initial entry into the specified position. The integer portion of the DateTime value indicates the number of days that have elapsed since December 30th, 1899, and the fractional portion of the DateTime value indicates the fraction of the day that has passed since midnight. DateTime is a floating point value with high precision. It allows accessing millisecond time stamps of the bar.
 
   
 
   
 
'''Usage'''
 
'''Usage'''
Line 19: Line 19:
  
 
'''Example'''
 
'''Example'''
 +
 
Assign a value, indicating the date that the current position has been entered, to Value1 variable:  
 
Assign a value, indicating the date that the current position has been entered, to Value1 variable:  
 
<syntaxhighlight>
 
<syntaxhighlight>

Latest revision as of 13:34, 15 February 2023

Returns a double-precision decimal DateTime value indicating the date and time of initial entry into the specified position. The integer portion of the DateTime value indicates the number of days that have elapsed since December 30th, 1899, and the fractional portion of the DateTime value indicates the fraction of the day that has passed since midnight. DateTime is a floating point value with high precision. It allows accessing millisecond time stamps of the bar.

Usage

EntryDateTime_Checked (PosBack)

Where:

  • PosBack - a numerical expression, specifying the position:
0 - open position;
1 - one position back (the last position closed);
2 - two positions back, etc.

If PosBack is not specified, a value for the open position will be returned.

Notes This function can only be used in signals.

  1. If PosBack value is greater that the real number of previously opened positions,
  2. EntryDateTime_Checked will generate an error.

Example

Assign a value, indicating the date that the current position has been entered, to Value1 variable:

Value1=EntryDateTime_Checked;