> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ninjatrader.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ninjatrader.com/_mcp/server.

# Analytical

NinjaScript provides a number of methods and properties useful for analyzing and identifying specific conditions within **Series`\<t\>`** collections. Some of these methods test a condition and return true or false, while others return an int-based bar index or other numerical value. A list of analytical methods can be found below:

| Methods and Properties                                                                                           | Description                                                                                           |
| ---------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| [CountIf()](/developer/desktop-sdk/references/common/analytical/countif)                                         | Counts the number of occurrences of the test condition                                                |
| [CrossAbove()](/developer/desktop-sdk/references/common/analytical/crossabove)                                   | Evaluates a cross above condition                                                                     |
| [CrossBelow()](/developer/desktop-sdk/references/common/analytical/crossbelow)                                   | Evaluates a cross below condition                                                                     |
| [GetCurrentAsk()](/developer/desktop-sdk/references/common/analytical/getcurrentask)                             | Returns the current Ask price                                                                         |
| [GetCurrentAskVolume()](/developer/desktop-sdk/references/common/analytical/getcurrentaskvolume)                 | Returns the current Ask volume                                                                        |
| [GetCurrentBid()](/developer/desktop-sdk/references/common/analytical/getcurrentbid)                             | Returns the current Bid price                                                                         |
| [GetCurrentBidVolume()](/developer/desktop-sdk/references/common/analytical/getcurrentbidvolume)                 | Returns the current Bid volume                                                                        |
| [GetMedian()](/developer/desktop-sdk/references/common/analytical/getmedian)                                     | Returns the median value of the specified series                                                      |
| [HighestBar()](/developer/unsorted/highestbar)                                                                   | Returns the number of bars ago the highest price value occurred                                       |
| [IsFalling()](/developer/desktop-sdk/references/common/analytical/isfalling)                                     | Evaluates a falling condition                                                                         |
| [IsRising()](/developer/desktop-sdk/references/common/analytical/isrising)                                       | Evaluates a rising condition                                                                          |
| [Least Recent Occurrence (LRO)](/developer/desktop-sdk/references/common/analytical/least-recent-occurrence-lro) | Returns the number of bars ago that the least recent occurrence of a test condition evaluated to true |
| [LowestBar()](/developer/desktop-sdk/references/common/analytical/lowestbar)                                     | Returns the number of bars ago the lowest price value occurred                                        |
| [Most Recent Occurrence (MRO)](/developer/desktop-sdk/references/common/analytical/most-recent-occurrence-mro)   | Returns the number of bars ago that the most recent occurrence of a test condition evaluated to true  |
| [Slope()](/developer/desktop-sdk/references/common/analytical/slope)                                             | Returns a measurement of the steepness of a price series measured by the change over time             |
| [TickSize](/developer/desktop-sdk/references/common/analytical/ticksize)                                         | The value of 1 tick for the corresponding instrument                                                  |
| [ToDay()](/developer/desktop-sdk/references/common/analytical/today)                                             | Calculates an integer value representing a date                                                       |
| [ToTime()](/developer/desktop-sdk/references/common/analytical/totime)                                           | Calculates an integer value representing a time                                                       |