Vector Arcsine

Technical Analysis Indicator: asin

Fork me on GitHub

Function Prototype

/* Vector Arcsine */
/* Type: simple */
/* Input arrays: 1    Options: 0    Output arrays: 1 */
/* Inputs: real */
/* Options: none */
/* Outputs: asin */
int ti_asin_start(TI_REAL const *options);
int ti_asin(int size,
      TI_REAL const *const *inputs,
      TI_REAL const *options,
      TI_REAL *const *outputs);

Description

This documentation is still a work in progress. It has omissions, and it probably has errors too. If you see any issues, or have any general feedback, please get in touch.

Vector Arcsine calculates the Trigonometric arcsine of each element in the input array.

$$asin_{t} = \arcsin{input_{t}}$$

This is sometimes useful as a building block to more complex functions.

See Also

References

Example Usage

Calling From C

/* Example usage of Vector Arcsine */
/* Assuming that 'input' is a pre-loaded array of size 'in_size'. */
TI_REAL *inputs[] = {input};
TI_REAL options[] = {}; /* No options */
TI_REAL *outputs[1]; /* asin */

/* Determine how large the output size is for our options. */
const int out_size = in_size - ti_asin_start(options);

/* Allocate memory for output. */
outputs[0] = malloc(sizeof(TI_REAL) * out_size); assert(outputs[0] != 0); /* asin */

/* Run the actual calculation. */
const int ret = ti_asin(in_size, inputs, options, outputs);
assert(ret == TI_OKAY);

Calling From Lua (with Tulip Chart bindings)

-- Example usage of Vector Arcsine
asin = ti.asin(input)

Example Calculation

dateinputasin
2005-11-010.200.20
2005-11-020.300.31
2005-11-030.400.41
2005-11-040.300.31
2005-11-070.500.52
2005-11-080.700.78
2005-11-090.750.85
2005-11-100.901.12
2005-11-110.901.12
2005-11-141.001.57
2005-11-151.001.57
2005-11-160.200.20
2005-11-170.100.10
2005-11-18-0.10-0.10
2005-11-21-0.50-0.52

Chart

 

Other Indicators

Previous indicator: Aroon Oscillator

Next indicator: Vector Arctangent

Random indicator: Time Series Forecast