Feature

Custom JavaScript Trading Strategies

Build custom JavaScript trading strategies for Gunbot, expose configurable frontend settings, backtest the logic and retain control of bot decisions.

See features
Everything included - $29/mo
Gunbot Live code editor showing config.js and custom strategy editor files for JavaScript strategy customization
Short answer

Custom JavaScript strategies let you code your own strategy logic and manage custom settings through the frontend when the setup exposes them. This gives you more flexibility than fixed presets, and it also increases your responsibility for testing and risk.

What This Feature Does

Custom strategy work is for cases where fixed presets are not enough. You can work with strategy files you create, expose supported settings in the interface when valid metadata is available, and keep custom strategy selection tied to the pair, exchange, and market you are trading.

Example Workflow

Write the trading logic in JavaScript, store it in the custom strategy folder, expose settings through the strategy metadata file, select the custom strategy in the frontend, and review every parameter before live use.

Risks And Limits

The limits matter: JavaScript strategy code can contain logic errors. A custom strategy may not handle every exchange, pair, or market type correctly. Backtesting and paper review should be used before live capital when supported.

Trading Reality

It gives Gunbot a browser workspace for monitoring, strategy work, backtesting, risk review, history, and exchange-connected operations. These pages explain what the product does. Your account data stays on your local trading bot, behind login.

Operational Limits

The dashboard depends on the connected Gunbot instance, the exchange API, and the network between them. It can make problems easier to notice, but it does not remove market risk or take responsibility away from you: exchange permissions, strategy settings, open orders, and capital allocation still need your review.

Plain Definition For Builders

Custom JavaScript strategies are custom trading algorithms. They allow you or a developer to express logic that is not covered by a built-in strategy: custom indicators, market filters, order rules, position management, external signals, or experimental research ideas.

Frontend Settings From Custom Strategy Metadata

A custom strategy is easier to use when the frontend can read a metadata file that describes its settings. The interface should not hardcode one strategy name. It should load the custom strategy settings exposed by your local files and render them when that custom strategy is selected.

Developer Checklist

Custom strategy work should be easy to understand later. Use explicit file names, expose settings with labels and defaults when possible, test historical behavior when supported, start with small size, handle missing data and exchange errors, and log enough detail to debug without leaking secrets.

Risks Of Custom Strategy Code

Custom code can fail in simple ways: syntax errors can stop trading logic, logical errors can place orders at the wrong time, market-specific assumptions can break on another exchange, and weak input validation can turn a setting into a dangerous control.

External references

FAQ

Can anyone write a custom strategy?

The feature is intended for people who understand JavaScript, Gunbot strategy behavior, and trading risk.

Are custom strategy settings hardcoded?

No. The frontend should read the settings exposed by the custom strategy metadata rather than assuming a specific strategy name.

Why use JavaScript for custom strategies?

JavaScript gives you a flexible way to express custom trading logic and integrate with the existing Gunbot strategy workflow.

Should custom settings appear automatically in the frontend?

Yes, when valid custom strategy metadata exists. The frontend should read the custom settings instead of assuming one hardcoded custom strategy.

Last updated: