# XTRADE.RUN[analysis]

**AXCEL.XTRADE.RUN[analysis] function**

This function is part of XTRADE functions group which is a collection of several technical indicators for creating technical trading rules. XTRADE.RUN[analysis] applies [analysis] over n periods and reports the results. The list of analysis includes:

**RUNSUM**: calculates the sum of n periods

**RUNMIN**: returns minimums over a n-period moving window.

**RUNMAX**: returns maximums over a n-period moving window.

**RUNMEAN**: returns means over a n-period moving window.

**RUNMEDIAN**: returns medians over a n-period moving window.

**RUNSD**: returns standard deviations over a n-period moving window.

**RUNVAR**: returns variances over a n-period moving window.

**RUNMAD**: returns median/mean absolute deviations over a n-period moving window.

Disclaimer:

Due to many factors, over which we have no control, performance and/or outcomes may differ substantially from any estimates, projections or predictions that have been made by our services or functions. We use several software and services from sources believed to be reliable, however accuracy and completeness cannot be guaranteed. Loss of all or part of the original capital invested in an investment or investment strategy derived by these functions and/or services may occur. Any investments and/or transactions implied by our services or functions are done at your own risk.

**Syntax**

AXCEL.XTRADE.RUNSUM(stockprice, n, [dateFormat], [plot]) AXCEL.XTRADE.RUNMIN(stockprice, n, [dateFormat], [plot]) AXCEL.XTRADE.RUNMAX(stockprice, n, [dateFormat], [plot]) AXCEL.XTRADE.RUNMEAN(stockprice, n, [dateFormat], [plot]) AXCEL.XTRADE.RUNMEDIAN(stockprice, n, [dateFormat], [plot]) AXCEL.XTRADE.RUNSD(stockprice, n, [dateFormat], [plot]) AXCEL.XTRADE.RUNVAR(stockprice, n, [dateFormat], [plot]) AXCEL.XTRADE.RUNMAD(stockprice, n, [dateFormat], [plot])

The AXCEL.XTRADE.RUN[analysis] function syntax has the following arguments:

**stockprice** Required. This is a table of stock price or any other values such as volume. The format must be a table of two columns, the first column for time/date index and the second column is the values. Here is an example:

Date | Price |

08/24/2020 | 120.10 |

08/25/2020 | 121.65 |

08/26/2020 | 119.88 |

… | … |

… | … |

AXCEL.XTRADE.RUNxxx function uses the second column for its calculations.

**n** Required. Number of periods to average over. Must be between 1 and number of rows, inclusive.

**dateFormat** Optional. If the date in Date columns is Excel standard date format, you do not need to provide any format, and Axcel will automatically identify the date format and applies the conversion. However, if the date is provided in TEXT format, you should define the date format for appropriate conversion. Here are the elements of the date format:

/ or - : Separators %d: day %m: month %y: 2-digit year (for example 98 or 07) %Y: 4-digit year (for example 1998 or 2007)

Here are some examples of date format:

for "08/22/2019" : "%m/%d/%Y" for "19/08/22" : "%y/%m/%d" for "2019-08-22" : "%Y-%m-%d"

**plot** Optional. Default is FALSE. If you set it TRUE, Axcel provides you an advanced interactive visualization showing security price and the values calculated by xxx function.

Here is an example for AXCEL.XTRADE.RUNMAX:

when you type =AXCEL.XTRADE.RUNMAX the Intellisense guides you through required and optional (shown in brackets []) entries as shown below:

In this example, we have:

=AXCEL.XTRADE.RUNMAX(A1:B300, 10,, TRUE)

which means that our data is located at cells from A1 to B300, we set the number of periods for reporting maximum values at 10 days. Also, since we use Excel standard date format, we skipped the dateFormat entry and we would like to have visualization by setting the plot to TRUE. Here is the outcome:

As presented above, Axcel generates maximum values for a 10-day window and reports them in column *runMAX*. Also, the outcome is visualized in the task pane and ready to be expanded in your browser. In this example, since we set n to 10, the first 9 maximum values show *NA* after execution.

See also: All other *AXCEL.XTRADE* functions.