Returns the arcsine of a number, an angle in radians whose sine is that number.
math.asin is the inverse of math.sin. It accepts values from -1 to 1 and returns an angle between -math.pi / 2 and math.pi / 2.
Outside the range -1 to 1 there is no angle, and the result is na.
Syntax
math.asin(angle: simple int/float) -> simple float
math.asin(angle: input int/float) -> input float
math.asin(angle: const int/float) -> const float
math.asin(angle: series int/float) -> series floatArguments
| Name | Type | Default | Description |
|---|---|---|---|
| angle | const/ | required | A value from -1 to 1. Anything outside that range gives na. |
Returns
const/input/simple/series float: the angle in radians.
Remarks
- Scale first when feeding a series:
math.asin(x /ta.highest(math.abs(x), 50)).
Example
//@version=6
indicator("Arcsine")
x = ta.rsi(close, 14) / 50 - 1
plot(math.todegrees(math.asin(x)), "Angle (degrees)", color = color.blue)See also
Runs on Sidechair