trading bots

HaasScript Explained: Build Your Own Crypto Bots on HaasOnline

HaasScript is the scripting language behind HaasOnline, one of the oldest crypto trading bot platforms (HaasBot). It lets you build your own trading bots, indicators and utilities instead of relying on “black box” strategies. This guide explains what HaasScript is, how its two editors work, how to test scripts safely and what the newer AI tools can do. It is based on HaasOnline's own documentation as of October 2026.

What is HaasScript?

HaasScript is a language built specifically for automated crypto trading. Instead of general-purpose code, you work with reusable functions HaasOnline calls commands, covering things like reading prices and indicators, placing and managing orders, and safety checks. One example is checking for mismatched positions when “ghost orders” appear in a volatile session. HaasOnline says the language and its TradeServer let you take scripts from idea to release candidate around three times faster than traditional programming.

You choose how much control you want. In managed trading HaasOnline handles position and order bookkeeping for you. In unmanaged trading your script controls every order itself.

Two ways to write HaasScript

  • Visual editor: drag and drop blocks to build a strategy without writing code. It is a good way to learn the commands.
  • Web (code) editor: write HaasScript as text with autocomplete. Some experienced users write in their own editor for type checking and version control, then paste the result in.

Both editors are available on every TradeServer Cloud plan.

Testing your scripts

  1. Backtest on historical data. Depth depends on your plan: up to 1 month on Starter, 6 months on Standard, 12 months on Pro and 36 months on the self-hosted TradeServer.
  2. Optimise with HaasLabs (Standard and above), which runs batches of backtests across parameter ranges to find more robust settings.
  3. Paper trade the script on live markets without real money.
  4. Only then run it live with a small allocation.

Treat backtest results with caution: heavily optimised settings often fit the past better than the future.

Using AI to write HaasScript

HaasOnline offers an MCP server (Model Context Protocol) on Standard plans and above. It lets Claude, Codex, Cursor or another MCP-compatible assistant connect to your TradeServer. The assistant can:

  • read your bots, logs, positions and balances, for example to explain why a grid bot underperformed;
  • create, edit and compile HaasScripts;
  • set up HaasLabs and run backtests, with the results saved to your workspace for you to review.

By design it cannot place orders, move or withdraw funds, or start, stop or change a live bot, and your exchange keys never reach the model. Deploying a strategy is always your decision.

Can I import TradingView Pine Script?

Not directly. Pine Script and HaasScript are different languages, so scripts have to be converted first. If your strategy already runs in TradingView, you can instead send its alerts to HaasOnline's signal manager, or use a webhook-based bot such as 3Commas Signal Bot or TV-Hub.

Which HaasOnline plan do you need?

Plan (annual, paid in crypto) Bots Backtesting HaasLabs AI agent (MCP)
Starter – $11.99/month 3 1 month No No
Standard – $29.99/month 8 6 months Yes Yes
Pro – $59.99/month 20 12 months Yes Yes
TradeServer (self-hosted) – $149.99/month 100+ 36 months Yes Yes

For serious scripting, Standard is the realistic minimum because it adds HaasLabs and AI access. There's a 7-day free trial of Standard with no card required. Full details in our HaasOnline review.

Is HaasScript worth learning?

If you want strategies no off-the-shelf bot offers, and the ability to test them properly, yes. HaasScript is one of the most complete toolsets available to retail traders. If you only need a standard grid or DCA bot, a simpler platform will get you there faster. See 3Commas vs Cryptohopper vs HaasOnline.

FAQ

Is HaasScript hard to learn?

Easier than general programming because it is built around trading commands, and the visual editor lets you start without code. Expect a learning curve for advanced, unmanaged strategies.

Can I run HaasScripts on other platforms?

No. HaasScript runs on HaasOnline's TradeServer (Cloud or self-hosted).

Where can I find example scripts?

HaasOnline has a community where users share, comment on and like each other's scripts, plus prebuilt bots on every plan.

Table of Contents

Picture of Chris Wyatt

Chris Wyatt

Chris has been in crypto since 2015 working with crypto trading bot companies and crypto trading exchanges as an expert consultant.

Latest Posts
Share this post