Skip to main content

Custom Strategies

Gunbot includes pre-built strategies, but you can also run your own JavaScript code with custom strategies. This is useful for developers who want to customize algorithms while using Gunbot's exchange connectivity and market data.

Custom strategies let you define the bot's logic in JavaScript, from simple rule-based bots to more complex models.

Info

JavaScript is a versatile scripting language commonly used for web development. In Gunbot, it allows for detailed customization of trading logic.

tip

Prototyping new strategy code can be done in seconds with our specialized GPT: Gunbot Custom Strategy Guru

Key Features of Custom Strategiesโ€‹

Full JavaScript Controlโ€‹

Custom strategies let you write JavaScript to control bot behavior, from unique buy/sell conditions to tracking indicators or automating portfolio management. You can define the logic you need.

Seamless Exchange Connectivityโ€‹

Gunbot provides built-in exchange connectivity. Custom strategies can use this to execute trades across supported exchanges without handling low-level API integrations.

Easy Trading Methodsโ€‹

Gunbot provides methods for common tasks like placing orders and requesting additional candle data. Collected market data is accessible so you can focus on strategy logic.

You can place orders, retrieve historical data, and manage open positions using predefined methods, which reduces low-level exchange work.

No Artificial Constraintsโ€‹

Custom strategies run your JavaScript code without artificial constraints on execution time or other limitations. You can implement complex strategies and use external modules or libraries.

Want to implement a neural network, access external financial data, or run long-running calculations? Custom strategies support those approaches.

Visualization Optionsโ€‹

Custom strategies can use visualization options to display additional data in the Gunbot interface.

You can visualize market conditions and strategy performance in real time. Add custom charts, trend lines, or statisticsโ€”for example, plot moving averages or Bollinger Bands and track custom KPIs.

Custom strategy visualization example showing real-time market analysis and performance metrics

Example of the custom Quanta G-type strategy using custom chart targets and custom stats in the sidebar on the right side of the screen.

Connect to Third Partiesโ€‹

Custom strategies can connect to third-party services. For example, you could call a weather API to incorporate weather data into your logic.

You might integrate sentiment analysis, economic indicators, or technical data from other platforms to inform decisions.