> ## Documentation Index
> Fetch the complete documentation index at: https://docs.baibaibot.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Query & Filter Builder

> Learn about the powerful Query & Filter Builder component that allows you to create custom trading signals based on specific conditions.

<img noZoom src="https://mintcdn.com/baibai/Q0FEDFNQDcX1j3TO/images/separator.jpg?fit=max&auto=format&n=Q0FEDFNQDcX1j3TO&q=85&s=5350c337aa3613424b48079d872b63e6" width="721" height="5" data-path="images/separator.jpg" />

## Introduction

The Query & Filter Builder allows you to easily create custom trading signals via a **user-friendly drag-and-drop interface - without any code experience**.

You can define and combine criteria based on hundreds of conditions, such as realtime OHLCV data (i.e. price, volume), social media mentions, news feeds, technical indicators, candlestick patterns, and more.

<img noZoom src="https://mintcdn.com/baibai/Q0FEDFNQDcX1j3TO/images/separator-small.png?fit=max&auto=format&n=Q0FEDFNQDcX1j3TO&q=85&s=8a26d422be09963b7e375935747563ae" width="721" height="1" data-path="images/separator-small.png" />

## How it works

Your final query (all the criteria you set) are constantly checked by the bot, and trades are executed automatically when all the conditions are met.

<img noZoom src="https://mintcdn.com/baibai/Q0FEDFNQDcX1j3TO/images/separator-small.png?fit=max&auto=format&n=Q0FEDFNQDcX1j3TO&q=85&s=8a26d422be09963b7e375935747563ae" width="721" height="1" data-path="images/separator-small.png" />

## Example

Let's say you want to create a criteria that triggers a buy signal when Elon Musk tweets about DOGE. All you need to do is to create a new filter criteria that listens to Elon Musk's X account and triggers a buy signal when a tweet is detected.

\[TODO] PIC

Now let's say you want to also check the price of DOGE and only trigger the buy signal when the price is above a certain threshold. You can easily add this condition to your query.

\[TODO] PIC

<img noZoom src="https://mintcdn.com/baibai/Q0FEDFNQDcX1j3TO/images/separator-small.png?fit=max&auto=format&n=Q0FEDFNQDcX1j3TO&q=85&s=8a26d422be09963b7e375935747563ae" width="721" height="1" data-path="images/separator-small.png" />

## Available Criteria

The Query & Filter Builder offers hundreds of conditions to choose from, including:

TODO: List of filters

<img noZoom src="https://mintcdn.com/baibai/Q0FEDFNQDcX1j3TO/images/separator-small.png?fit=max&auto=format&n=Q0FEDFNQDcX1j3TO&q=85&s=8a26d422be09963b7e375935747563ae" width="721" height="1" data-path="images/separator-small.png" />

## Advanced Features

The Query & Filter Builder also offers advanced features such as:

* **Custom Variables**: Define custom variables that can be used in your criteria.
* **Custom Functions**: Define custom functions that can be used in your criteria.

<Tip>
  **Tip**: In order to use the advanced features, you need to write your own code bot using our [Bot SDK](/sdk-reference/introduction).
</Tip>
