> For the complete documentation index, see [llms.txt](https://docs.ezalgo.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ezalgo.ai/education/technical-analysis/chart-patterns/continuation-patterns/rectangles.md).

# Rectangles

The Rectangle chart pattern is a continuation pattern that forms as a trading range during a pause in the trend. The pattern is easily identifiable by two parallel trendlines—representing support and resistance—that the price action has been touching and bouncing off of, but has failed to break through. The rectangle pattern can occur in both an uptrend and a downtrend.

1. **Bullish Rectangle**: This forms during an uptrend and is a signal that the trend will continue. After a strong upward move, the price consolidates and moves sideways. This is typically seen as a period of rest before the price resumes the uptrend.
2. **Bearish Rectangle**: This forms during a downtrend and is a signal that the trend will continue. After a strong downward move, the price consolidates and moves sideways. This is typically seen as a period of rest before the price resumes the downtrend.

The pattern is confirmed when the price breaks out of the rectangle—in the direction of the prevailing trend. Traders often set price targets based on the height of the rectangle added/subtracted to/from the breakout point.

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

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

As with all chart patterns, it's important to consider the rectangle pattern within the larger market context and to use other technical analysis tools to confirm signals.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.ezalgo.ai/education/technical-analysis/chart-patterns/continuation-patterns/rectangles.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
