ExitsToday (Function)
The ExitsToday function returns the number of strategy position exits that occurred throughout the date specified by the input parameter Date0.
Syntax
ExitsToday(TargetDate_YYYMMDD)
Returns (Integer)
The number of strategy position exits on a date.
Parameters
Name | Type | Description |
TargetDate_YYYMMDD | Date | Sets the target date, entered in the format "YYYMMDD" or a date related function or calculation. |
Remarks
The ExitsToday function only works in Strategies, and will not work in any other indicator or analysis technique study type. The function is limited to looking back 10 positions, so the maximum number of ExitsToday that could be reported is 10, if there were 10 entries today.
The input parameter can be a constant value like such as 1020601 (6-1-2002), where 102 = 2002, 103 = 2003, 99 = 1999, and so on. It can also reference date related keywords like date (which returns the current bar date) and CurrentDate (which returns the datafeed date).
Examples
Assigns to Value1 the number of exits throughout each day on the chart:
Value1 = ExitsToday (Date);
Assigns to Value1 the number of exits throughout the current day only and then checks for three exits:
Value1 = ExitsToday (CurrentDate);
if Value1 = 3 then …