Overview of HaasScript

HaasScript is a scripting language comprised of over 600 built-in commands, text-based and visual editors and the ability to expand your command library with Custom Commands. With HaasScript you can quickly build and test prototypes and strategies, but are also able to create advanced systems like grid bots, index bots and market maker bots.

Text-based Editor

The text-based HaasScript is built on top of a scripting language called LUA. With HaasScript, you are able to utilize default LUA modules such as string, math, table and even metatable. The editor is also packed with syntax-color presets and you can even create your own.

Example of an SMA script in built-in LUA Editor

Visual Editor

If you are familiar with data-flow charts, you might find yourself enjoying the Visual Editor instead.

Example of an SMA script in built-in Visual Editor

Ease-of-Use vs Flexibility in HaasScript

When building a trading bot, there is often a trade-off between ease-of-use and flexibility. HaasScript offers a range of tools that cater to both ends of this spectrum.

Managed Trading

For novice traders or those looking for quick prototyping, HaasScript provides a range of Managed Trading commands. These commands are designed to simplify the process of building trading bots, making it easier for users to get started without requiring extensive knowledge of order or position management. Examples of Managed Trading commands include the DoBuy and DoExitPosition commands.

Unmanaged Trading

For advanced traders or those looking for more control over their trading strategies, HaasScript provides a range of Unmanaged Trading commands. These commands give users more flexibility in managing orders and positions, enabling them to build more complex trading bots. Examples of Unmanaged Trading commands include the PlaceGoLongOrder and PositionContainer commands.

Legacy Bot Building with TradeBot “Blocks”

HaasScript also offers a legacy bot-building interface known as TradeBot. This interface allows users to build bots using “building blocks” rather than writing logically operated code. While not as flexible as writing code directly, TradeBot commands are an easy way to prototype trading strategies or build simple bots without requiring extensive coding knowledge.

In summary, HaasScript provides users with a range of tools for building trading bots; from “building blocks” of legacy TradeBot, to easy-to-use Managed Trading commands, to more complex Unmanaged Trading commands. By offering a range of tools that cater to different skill levels and requirements, HaasScript enables users to build trading bots that suit their needs.

Back to: HaasScript Fundamentals > Getting Started