LuxBot

LuxBot is a practical Discord bot allowing users to display charts, get news, and even perform backtests by using simple commands.

Note that the bot is still in beta testing and might be subject to changes in the future.

!backtest

!backtest symbol timeframe strategy

The !backtest command allows backtesting various built-in strategies using a specific symbol and timeframe. The backtest is performed using the most recent 2000 bars and assumes no frictional costs.

The returned results include various metrics such: number of trades executed, final equity, equity peak, maximum drawdown, win rate, worst trade, and profit factor.

A new long position automatically closes a previous short position, while a new short position automatically closes a previous long position.

Note that not all symbols are supported, only several US stocks and futures are available, supported FOREX pairs and Cryptocurrencies can be found here.

Information about each strategy can be found below.

macross

The macross strategy is a simple moving average crossover strategy, users can define the type of moving averages alongside their periods, the macross syntax is defined as follows:

macross fastma_type(period[integer]) slowma_type(period[integer])

e.g:

!backtest GOOG 15 macross SMA(14) SMA(28)

The strategy opens a long position when the fast moving average crossover the slow one, and a short position when the fast moving average cross under the slow one.

Available moving average types include:

Full Name

Syntax

Simple Moving Average

SMA(period)

Exponential Moving Average

EMA(period)

Weighted Moving Average

WMA(period)

Double Exponential Moving Average

DEMA(period)

Triple Exponential Moving Average

TEMA(period)

Triangular Moving Average

TRIMA(period)

T3

T3(period)

Kaufman Adaptive Moving Average

KAMA(period)

supertrend

The supertrend strategy is a strategy based on the Supertrend indicator, the supertrend syntax is defined as follows:

supertrend(factor[float],length[integer])

e.g:

!backtest GOOG 15 supertrend(4,7)

The strategy opens a long position when the price crossover the supertrend, and a short position when the price cross under the supertrend.

macd

The macd strategy is a strategy based on the MACD indicator, the macd syntax is defined as follows:

macd(fast_period[integer],slow_period[integer],hist_period[integer])

e.g:

!backtest GOOG 15 macd(50,14,9)

The strategy opens a long position when the MACD histogram crossover 0, and a short position when the histogram cross under 0.

sar

The sar strategy is a strategy based on the SAR indicator, the sar syntax is defined as follows:

sar(acceleration[float],maximum[float])

e.g:

!backtest GOOG 15 sar(0.02,0.02)

The strategy opens a long position when the price crossover the SAR, and a short position when the price cross under the SAR.

rsi

The rsi strategy is a strategy based on the RSI indicator, the rsi syntax is defined as follows:

rsi(length[integer],upper[float],lower[float])

e.g:

!backtest GOOG 15 rsi(14,80,20)

The strategy opens a long position when the RSI cross under the lower level, and a short position when the RSI cross over the upper level.

stochastic

The stochastic strategy is a strategy based on the Stochastic indicator, the stochastic syntax is defined as follows:

stochastic(fastk[integer],slowk[integer],slowd[integer])

e.g:

!backtest GOOG 15 stochastic(50,20,7)

The strategy opens a long position when the Stochastic slow K crossover the Stochastic Slow D, and a short position when the Stochastic slow K cross under the Stochastic Slow D.

turtle

The turtle strategy is a strategy based on the Donchian Channel indicator, the turtle syntax is defined as follows:

turtle(length[integer])

e.g:

!backtest GOOG 15 turtle(14)

The strategy opens a long position when the high price is equal to the upper extremity of the Donchian Channel, and a short position when the low price is equal to the lower extremity of the Donchian Channel

momentum

The momentumstrategy is a strategy based on the Momentum indicator, the momentum syntax is defined as follows:

momentum(length[integer])

e.g:

!backtest GOOG 15 momentum(14)

The strategy opens a long position when the momentum oscillator crossover 0, and a short position when the momentum oscillator cross under 0.

bbands

The bbands strategy is a strategy based on the Bollinger Bands indicator, the bbands syntax is defined as follows:

bbands(length[integer],mult[float])

e.g:

!backtest GOOG 15 bbands(20,2)

The strategy opens a long position when the price crossover the upper extremity of the Bollinger Bands, and a short position when the price cross under the lower extremity of the Bollinger Bands.

!chart

!chart symbol timeframe *indicators

The !chart command allows getting the image of a tradingview chart of the requested symbol and timeframe.

The user can optionally request indicators to be displayed, e.g:

!chart BTCUSD 15 MACD RSI BB

The above command would display a Bitcoin chart using the 15min timeframe with the MACD, RSI, and BB indicators. The name of the indicators must be correct, else they won't be displayed, you can see the list of support indicators and their syntax below:

Full Name

Name For The Command

Accumulation Distribution

ACCD

Advance Decline Ratio

ADR

AROON

AROON

Average True Range

ATR

Awesome Oscillator

AwesomeOscillator

Bollinger Bands

BB

Bollinger Bands %B

BollingerBandsR

Bollinger Bands Width

BollingerBandsWidth

Chaikin Money Flow

CMF

Chaikin Oscillator

ChaikinOscillator

Chande Momentum

chandeMO

ChoppinessIndex

ChoppinessIndex

Commodity Channel Index

CCI

Connors RSI

CRSI

Correlation Coefficient

CorrelationCoefficient

Detrended Price Oscillator

DetrendedPriceOscillator

Directional Movement

DM

Donchian Channels

DONCH

Double EMA

DoubleEMA

Ease Of Movement

EaseOfMovement

Elder's Force Index

EFI

Envelopes

ENV

Fisher Transform

FisherTransform

Historical Volatility

HV

Hull Moving Average

hullMA

Ichimoku Cloud

IchimokuCloud

Keltner Channels

KLTNR

Know Sure Thing

KST

Linear Regression

LinearRegression

Moving Average Convergence Divergence

MACD

Momentum

MOM

Money Flow

MF

Moon Phases

MoonPhases

Simple Moving Average

MASimple

Exponential Moving Average

MAExp

Weighted Moving Average

MAWeighted

On Balance Volume

OBV

Parabolic SAR

PSAR

Pivot Points High Low

PivotPointsHighLow

Pivot Points Standard

PivotPointsStandard

Price Oscillator

PriceOsc

Price Volume Trend

PriceVolumeTrend

Rate of Change

ROC

Relative Strength Index

RSI

Vigor Index

VigorIndex

Volatility Index

VolatilityIndex

SMI Ergodic Indicator

SMIErgodicIndicator

SMI Ergodic Oscillator

SMIErgodicOscillator

Stochastic Oscillator

Stochastic

Stochastic RSI

StochasticRSI

Triple EMA

TripleEMA

Trix Oscillator

Trix

Ultimate Oscillator

UltimateOsc

Volatility Stop

VSTOP

VWAP

VWAP

Weighted Moving Average

MAVolumeWeighted

William %R

WilliamR

!ha

!chart symbol timeframe *indicators

The !ha works like the !chart command but will return the image of a Heikin-Ashi chart instead of regular candles.

!news

!news keyword

The !news command returns the link of a news related to the requested keyword.

!ticker

!ticker symbol

The !ticker command allows getting an image showing various market data for the requested symbol.