> For the complete documentation index, see [llms.txt](https://infinity.aloen.to/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://infinity.aloen.to/infinity-algo-features/next-signals-must-be-opposite-signal.md).

# 下一个信号必须是相反信号 Next Signals Must Be Opposite Signal

控制信号是否必须交替方向，或可以重复相同方向。

![相反方向信号设置](https://2387257950-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5cf3dRpPzq1Qbyc8GksH%2Fuploads%2FWY4Pufa0V6EpJ22zwf4e%2Fimage.png?alt=media\&token=17731877-84c5-4888-80f4-ff996322358d)

***

## 🎯 工作原理 (How It Works)

{% tabs %}
{% tab title="✅ 启用 (Enabled)" %}

#### 强制交替 (Forced Alternation)

**模式 (Pattern)：** 买入 (Buy) → 卖出 (Sell) → 买入 (Buy) → 卖出 (Sell)

✅ 仅限清晰反转 ✅ 单次一个仓位 ✅ 无连续信号 ✅

**示例 (Example)：**

* 上一个信号：买入 (Buy) ✅
* 下一个可能：仅卖出 (Sell)
* 过滤掉：任何买入 (Buy) 信号
  {% endtab %}

{% tab title="❌ 禁用 (Disabled) - 默认 (Default)" %}

#### 允许任何信号 (Any Signal Allowed)

**模式 (Pattern)：** 买入 (Buy) → 买入 (Buy) → 卖出 (Sell) → 买入 (Buy) → 卖出 (Sell) → 卖出 (Sell)

✅ 允许多次进场 (Multiple entries) ✅ 可跟随趋势 (Trend following) ✅ 支持金字塔加仓 (Pyramiding) ✅ 显示所有信号

**示例 (Example)：**

* 上一个信号：买入 (Buy) ✅
* 下一个可能：买入 (Buy) 或卖出 (Sell)
* 显示：所有有效信号
  {% endtab %}
  {% endtabs %}

***

## 📊 快速对比 (Quick Comparison)

| 功能 (Feature)                   | 启用 (Enabled)             | 禁用 (Disabled)            |
| ------------------------------ | ------------------------ | ------------------------ |
| **信号模式 (Signal Pattern)**      | 买 → 卖 → 买 (Buy→Sell→Buy) | 任意序列 (Any sequence)      |
| **连续信号 (Consecutive Signals)** | ❌ 从不 (Never)             | ✅ 允许 (Allowed)           |
| **最佳市场 (Best Market)**         | 震荡市 (Ranging)            | 趋势市 (Trending)           |
| **仓位风格 (Position Style)**      | 单次一个 (One at a time)     | 多仓可能 (Multiple possible) |
| **信号频率 (Signal Frequency)**    | 较少 (Fewer)               | 较多 (More)                |

***

## 🎨 何时使用 (When to Use)

{% columns %}
{% column width="50%" %}

#### ✅ **启用条件 (Enable For)：**

* 震荡交易 (Range trading)
* 均值回归 (Mean reversion)
* 单仓位 (Single position only)
* 清晰反转 (Clean reversals)
* 高波动市场 (Volatile markets)
  {% endcolumn %}

{% column %}

#### ❌ **禁用条件 (Disable For)：**

* 趋势跟随 (Trend following)
* 金字塔加仓策略 (Pyramiding strategies)
* 强趋势行情 (Strong trends)
* 多次进场 (Multiple entries)
* 动量交易 (Momentum trading)
  {% endcolumn %}
  {% endcolumns %}

***

## 📈 可视化示例 (Visual Example)

### 启用 (Enabled) - 交替模式 (Alternating)

{% code title="pattern-enabled.txt" %}

```
买入 (Buy) ✅ → 卖出 (Sell) ✅ → 买入 (Buy) ✅ → 卖出 (Sell) ✅
         ↓ 跳过买入 (Skips Buy signals)
```

{% endcode %}

### 禁用 (Disabled) - 任意序列 (Any Sequence)

{% code title="pattern-disabled.txt" %}

```
买入 (Buy) ✅ → 买入 (Buy) ✅ → 买入 (Buy) ✅ → 卖出 (Sell) ✅
         ↓ 显示所有信号 (Shows all signals)
```

{% endcode %}

***

## 💡 专业建议 (Pro Tips)

{% hint style="success" %}
**最佳实践 (Best Practice)：** 在震荡市启用，在趋势市禁用
{% endhint %}

{% hint style="info" %}
**说明 (Note)：** 启用此选项时，将覆盖"切换相同信号连续 (Toggle Same Signal Consecutively)"设置 - 此为更严格的规则
{% endhint %}

{% hint style="warning" %}
**注意 (Remember)：** 启用此选项会减少信号频率，但增加信号清晰度
{% endhint %}

\\


---

# 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:

```
GET https://infinity.aloen.to/infinity-algo-features/next-signals-must-be-opposite-signal.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.
