Vector Exponential

Technical Analysis Indicator: exp

Fork me on GitHub

Function Prototype

/* Vector Exponential */
/* Type: simple */
/* Input arrays: 1    Options: 0    Output arrays: 1 */
/* Inputs: real */
/* Options: none */
/* Outputs: exp */
int ti_exp_start(TI_REAL const *options);
int ti_exp(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 Exponential returns the exponential for each number in the input arary. That is, it calculates Euler's constant e raised to the power of each input element.

$$exp_{t} = e^{input_{t}} $$

See Also

References

Example Usage

Calling From C

/* Example usage of Vector Exponential */
/* 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]; /* exp */

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

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

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

Calling From Lua (with Tulip Chart bindings)

-- Example usage of Vector Exponential
exp = ti.exp(input)

Example Calculation

dateinputexp
2005-11-0181.59271,698,210,797,322,617,746,986,289,097,342,976.00
2005-11-0281.06159,922,917,128,021,262,288,099,583,199,281,152.00
2005-11-0382.87977,200,578,319,748,271,368,630,926,489,681,920.00
2005-11-0483.001,112,863,754,791,759,440,048,804,931,959,783,424.00
2005-11-0783.612,048,149,396,884,781,878,395,598,861,896,777,728.00
2005-11-0883.151,292,963,217,808,244,848,955,673,524,217,839,616.00
2005-11-0982.84948,319,936,611,417,806,602,115,975,303,135,232.00
2005-11-1083.992,994,977,299,923,604,101,703,848,438,643,294,208.00
2005-11-1184.555,243,224,397,987,333,847,806,654,305,150,173,184.00
2005-11-1484.364,335,932,307,230,322,463,588,934,172,146,663,424.00
2005-11-1585.5313,970,341,975,054,017,938,741,814,957,736,722,432.00
2005-11-1686.5438,356,985,106,841,939,268,380,664,871,117,651,968.00
2005-11-1786.8954,431,152,826,993,960,342,626,147,053,405,732,864.00
2005-11-1887.77131,228,050,370,549,421,255,858,631,904,847,724,544.00
2005-11-2187.2981,201,738,108,396,506,642,731,151,999,969,001,472.00

Chart

 

Other Indicators

Previous indicator: Ease of Movement

Next indicator: Fisher Transform

Random indicator: Standard Error Over Period