# How it works?

1. Signal Generation:
   * A software or server generates buy and sell signals based on predefined trading strategies.
2. API Integration:
   * The software/server is linked to your demat account through an Application Programming Interface (API).
   * An API serves as a communication bridge, allowing the software/server to send orders to your demat account securely.
3. Order Placement:
   * The trading strategy implemented in the algo software produces buy and sell signals.
   * These signals are transmitted to your broker via the API, specifying the desired actions (buy or sell) in the market.
4. Execution:
   * Upon receiving the signals, your broker executes the orders in your demat account at the prevailing market price.

<figure><img src="/files/ECeXSxmOuUSC02jRW7Q8" alt=""><figcaption></figcaption></figure>

In summary, algo trading functions by utilizing software or servers to generate trading signals based on predefined strategies. These signals are then communicated to your broker through an API, enabling automated order placement and execution in your demat account.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://brainautotech.gitbook.io/brain-auto-tech/everything-about-algo/how-it-works.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
