TakeProfit home page
Search...
⌘K
Ask AI
Discord
Email us
Platform
Platform
Search...
Navigation
Packages & builtins
Package indie.math
TakeProfit Guide
Indie Language
Core Concepts
What is Indie?
Quick start
Language differences with Python
Data & Execution Logic
Indicator Code Structure
How Indies syntactic sugar works
Data types in Indie
Algorithms for series processing
Input parameters
Schedules and Trading Sessions
Plotting and drawing
Request additional instruments
Library reference
Packages & builtins
Overview
Package indie
Package indie.algorithms
Package indie.plot
Package indie.drawings
Package indie.color
Package indie.math
Package indie.schedule
Package datetime
Package statistics
Package math
Builtins
Indie MCP server
MCP Server Setup Guide
Code examples
Educational indicators
Common drawing patterns
Built-in indicators
Indie Changelog
Changelog
On this page
Functions
cross()
cross_over()
cross_under()
divide()
Packages & builtins
Package indie.math
Utility functions for simple calculations in Indie indicators.
Functions
cross()
function
Overloads
cross
(src1, src2) -> bool
Checks if two series just have crossed each other.
Show parameters info
src1
indie.Series[float]
required
First series to make crossing check.
src2
indie.Series[float]
required
Second series to make crossing check.
cross
(src, level) -> bool
Checks if two series just have crossed each other.
Show parameters info
src
indie.Series[float]
required
Series to make crossing check.
level
float
required
Constant level to make crossing check.
cross_over()
function
Overloads
cross_over
(src1, src2) -> bool
Checks if the first series just have crossed over the second one.
Show parameters info
src1
indie.Series[float]
required
First series to make crossing check.
src2
indie.Series[float]
required
Second series to make crossing check.
cross_over
(src, level) -> bool
Checks if the first series just have crossed over the second one.
Show parameters info
src
indie.Series[float]
required
Series to make crossing check.
level
float
required
Constant level to make crossing check.
cross_under()
function
Overloads
cross_under
(src1, src2) -> bool
Checks if the first series just have crossed under the second one.
Show parameters info
src1
indie.Series[float]
required
First series to make crossing check.
src2
indie.Series[float]
required
Second series to make crossing check.
cross_under
(src, level) -> bool
Checks if the first series just have crossed under the second one.
Show parameters info
src
indie.Series[float]
required
Series to make crossing check.
level
float
required
Constant level to make crossing check.
divide()
function
Overloads
divide
(numerator, denominator, default) -> float
Safely divides two numbers, returning a default value if the denominator is near zero.
Show parameters info
numerator
float
required
Numerator.
denominator
float
required
Denominator.
default
float
default:
math.nan
Default value.
Was this page helpful?
Yes
No
Package indie.color
Package indie.schedule
Assistant
Responses are generated using AI and may contain mistakes.