What's new

Level up your trading game with Naxbot

Naxbot R is the world's first fully programmable crypto trading bot with an integrated metaheuristic optimization engine. Join us today to automate the mundane aspects of trading, so you can spend more time crafting profitable strategies. Self-hosted with no DRM or licensing, buy once - own forever!

API Reference

  • Views Views: 952
  • Last updated Last updated:
  • The following indicators are all implemented natively within Naxbot R for maximum performance.

    💡 This page will be regularly updated with new releases of Naxbot R.


    Code:
    crossover(a: Array<number>, b: Array<number>) -> Array<bool>
    💬 Will return true in places where a crosses over b. "Crossover" means: a[n] > b[n] && a[n-1] < b[n-1].

    ⚠️ a and b must be of the same length.

    Code:
    crossunder(a: Array<number>, b: Array<number>) -> Array<bool>
    💬 Will return true in places where a crosses under b. "Crossunder" means: a[n] < b[n] && a[n-1] > b[n-1].

    ⚠️ a and b must be of the same length.

    Code:
    pad(a: Array<number>, n: number, [b]: Array<number>) -> Array<number>
    💬 Will "pad" the elements of a, by shifting them n places to the right. Optionally takes in a parameter b that will be used to fill in the blank elements at the start of the array (will be filled in with zeroes otherwise).

    ⚠️ If b is set, it must contain at least n elements.

    ⚠️ If n is negative, elements will be shifted to the left instead.

    💡 Example:
    Lua:
    local a = {1, 2, 3, 4, 5, 6};
    local padded = pad(a, 2);
    -- contents of "padded": {0, 0, 1, 2, 3, 4}
    local custom_padded = pad(a, 2, {8, 9});
    -- contents of "custom_padded": {8, 9, 1, 2, 3, 4}

    local leftpadded = pad(a, -2);
    -- contents of "leftpadded": {3, 4, 5, 6, 0, 0}
    local custom_leftpadded = pad(a, -2, {8, 9})
    -- contents of "custom_leftpadded": {3, 4, 5, 6, 8, 9}

    Code:
    ema(a: Array<number>, n: number) -> Array<number>
    💬 Returns the exponential moving average of a over length n

    Code:
    wma(a: Array<number>, n: number) -> Array<number>
    💬 Returns the weighted moving average of a over length n

    Code:
    sma(a: Array<number>, n: number) -> Array<number>
    💬 Returns the simple moving average of a over length n

    Code:
    rma(a: Array<number>, n: number) -> Array<number>
    💬 Returns the rolling moving average of a over length n

    Code:
    hullma(a: Array<number>, n: number) -> Array<number>
    💬 Returns the hull moving average of a over length n

    Code:
    bb_upper(a: Array<number>, n: number, m: number) -> Array<number>
    💬 Returns the upper bollinger band of a over length n with multiplier m

    Code:
    bb_lower(a: Array<number>, n: number, m: number) -> Array<number>
    💬 Returns the lower bollinger band of a over length n with multiplier m

    Code:
    lowest(a: Array<number>, n: number) -> Array<number>
    💬 Returns the lowest value of a over length n

    Code:
    highest(a: Array<number>, n: number) -> Array<number>
    💬 Returns the highest value of a over length n

    Code:
    stdev(a: Array<number>, n: number) -> Array<number>
    💬 Returns the standard deviation of a over length n

    Code:
    ehlers_super_smoother(a: Array<number>, n: number) -> Array<number>
    💬 Smooths the values of a over length n

    Code:
    rsi(a: Array<number>, n: number) -> Array<number>
    💬 Returns the relative strength index of a over length n

    Code:
    ln(a: Array<number>) -> Array<number>
    💬 Returns the natural logarithm of a

    Code:
    nz(a: Array<number>) -> Array<number>
    💬 Replaces NaN values in a with the number 0

    Code:
    avg(a: Array<Array<number>>) -> Array<number>
    💬 Returns the average of all given arrays (element-wise)

    💡 Example usage:
    Lua:
    local average = avg({a, b, c});

    Code:
    stoch(a: Array<number>, high: Array<number>, low: Array<number>, n: Array<number>) -> Array<number>
    💬 Stochastic, calculated using the formula of 100 * (a - lowest(low, n)) / (highest(high, n) - lowest(low, n))
Top