# Standard Deviation (20, 1)

### Introduction

The Standard Deviation is a **volatility measurement** indicator that provides **strategy selection** and **risk management** capabilities for **both LONG and SHORT strategies**. This statistical measure quantifies the dispersion of prices from their average over a specified period, making it essential for understanding market volatility, setting appropriate position sizes, and selecting optimal trading strategies based on current market conditions.

### How Standard Deviation Works

Standard Deviation measures how much prices deviate from their average over a specified period. It's calculated as the square root of variance and forms the basis for Bollinger Bands. The calculation quantifies price dispersion, providing objective volatility measurements.

• **Volatility quantification** - Measures the degree of price variation from the mean\
• **Risk assessment** - Higher standard deviation indicates higher risk and uncertainty\
• **Strategy selection** - High StdDev suggests trend-following, low StdDev suggests mean-reversion\
• **Bollinger Band foundation** - Standard deviation determines Bollinger Band width\
• **Market regime identification** - Helps classify market conditions for appropriate strategies

{% hint style="info" %}
**Statistical Psychology:** Standard Deviation reflects market consensus and disagreement. High standard deviation indicates participants have widely different opinions about fair value, creating volatility. Low standard deviation suggests market consensus, leading to quieter price action. This makes it invaluable for adapting strategies to market conditions.
{% endhint %}

#### Key Characteristics

| Attribute        | Details                                                     |
| ---------------- | ----------------------------------------------------------- |
| **Category**     | Volatility Indicators                                       |
| **Type**         | Statistical Volatility & Strategy Selection                 |
| **Primary Use**  | Volatility measurement, strategy selection, risk management |
| **Timeframe**    | All timeframes supported (1m to 1M)                         |
| **Confirmation** | Volume, price action, trend indicators                      |

### Strategy Applications

#### 🟢 LONG STRATEGY (Context-Dependent)

{% hint style="success" %}
Standard Deviation is excellent for LONG strategies when used for strategy selection: high StdDev for trend-following LONG strategies, low StdDev for mean-reversion LONG strategies.
{% endhint %}

**Base Entry Order (LONG) - High Volatility Trend Following**

```
Trigger Type: Once per bar close
Bar TF: 1H
First Condition: Standard Deviation (20, 1)
Timeframe: 1H
Operator: Greater Than
Second Condition: Simple Moving Average (20)
Timeframe: 1H

AND

First Condition: Close Price
Timeframe: 1H
Operator: Greater Than
Second Condition: Simple Moving Average (50)
Timeframe: 1H
```

**Additional Entry Orders (LONG)**

```
Additional Entry 1: Volatility expansion confirmation
First Condition: Standard Deviation (20, 1)
Timeframe: 1H
Operator: Greater Than
Second Condition: Value
Value: 0.02

AND

First Condition: Volume
Timeframe: 1H
Operator: Greater Than
Second Condition: Simple Moving Average (20)
Timeframe: 1H

OR

Additional Entry 2: Low volatility mean reversion setup
First Condition: Standard Deviation (20, 1)
Timeframe: 1H
Operator: Less Than
Second Condition: Simple Moving Average (20)
Timeframe: 1H

AND

First Condition: RSI
Timeframe: 1H
Operator: Less Than
Second Condition: Value
Value: 35
```

**Take Profit Orders (LONG)**

```
Rule 1: Exit condition - Volatility contraction (trend exhaustion)
First Condition: Standard Deviation (20, 1)
Timeframe: 1H
Operator: Cross Below
Second Condition: Simple Moving Average (20)
Timeframe: 1H

OR

Rule 2: Exit condition - High volatility warning
First Condition: Standard Deviation (20, 1)
Timeframe: 1H
Operator: Greater Than
Second Condition: Value
Value: 0.05

AND

First Condition: RSI
Timeframe: 1H
Operator: Greater Than
Second Condition: Value
Value: 70

OR

Rule 3: Exit condition - Mean reversion target reached
First Condition: Close Price
Timeframe: 1H
Operator: Greater Than
Second Condition: Simple Moving Average (20)
Timeframe: 1H

AND

First Condition: Standard Deviation (20, 1)
Timeframe: 1H
Operator: Less Than
Second Condition: Value
Value: 0.015
```

**Stop Loss Orders (LONG)**

```
Rule 1: Stop loss - Extreme volatility spike
First Condition: Standard Deviation (20, 1)
Timeframe: 1H
Operator: Greater Than
Second Condition: Value
Value: 0.08

OR

Rule 2: Stop loss - Trend breakdown with volatility
First Condition: Close Price
Timeframe: 1H
Operator: Less Than
Second Condition: Simple Moving Average (50)
Timeframe: 1H

AND

First Condition: Standard Deviation (20, 1)
Timeframe: 1H
Operator: Greater Than
Second Condition: Simple Moving Average (5)
Timeframe: 1H

OR

Rule 3: Stop loss - Low volatility breakdown
First Condition: Close Price
Timeframe: 1H
Operator: Less Than
Second Condition: Simple Moving Average (20)
Timeframe: 1H

AND

First Condition: Standard Deviation (20, 1)
Timeframe: 1H
Operator: Less Than
Second Condition: Value
Value: 0.01
```

#### 🔴 SHORT STRATEGY (Context-Dependent)

{% hint style="success" %}
Standard Deviation is equally effective for SHORT strategies when used for strategy selection: high StdDev for trend-following SHORT strategies, low StdDev for mean-reversion SHORT strategies.
{% endhint %}

**Base Entry Order (SHORT) - High Volatility Trend Following**

```
Trigger Type: Once per bar close
Bar TF: 1H
First Condition: Standard Deviation (20, 1)
Timeframe: 1H
Operator: Greater Than
Second Condition: Simple Moving Average (20)
Timeframe: 1H

AND

First Condition: Close Price
Timeframe: 1H
Operator: Less Than
Second Condition: Simple Moving Average (50)
Timeframe: 1H
```

**Additional Entry Orders (SHORT)**

```
Additional Entry 1: Volatility expansion confirmation
First Condition: Standard Deviation (20, 1)
Timeframe: 1H
Operator: Greater Than
Second Condition: Value
Value: 0.02

AND

First Condition: Volume
Timeframe: 1H
Operator: Greater Than
Second Condition: Simple Moving Average (20)
Timeframe: 1H

OR

Additional Entry 2: Low volatility mean reversion setup
First Condition: Standard Deviation (20, 1)
Timeframe: 1H
Operator: Less Than
Second Condition: Simple Moving Average (20)
Timeframe: 1H

AND

First Condition: RSI
Timeframe: 1H
Operator: Greater Than
Second Condition: Value
Value: 65
```

**Take Profit Orders (SHORT)**

```
Rule 1: Exit condition - Volatility contraction (trend exhaustion)
First Condition: Standard Deviation (20, 1)
Timeframe: 1H
Operator: Cross Below
Second Condition: Simple Moving Average (20)
Timeframe: 1H

OR

Rule 2: Exit condition - Oversold bounce warning
First Condition: RSI
Timeframe: 1H
Operator: Less Than
Second Condition: Value
Value: 30

AND

First Condition: Standard Deviation (20, 1)
Timeframe: 1H
Operator: Less Than
Second Condition: Simple Moving Average (10)
Timeframe: 1H

OR

Rule 3: Exit condition - Mean reversion target reached
First Condition: Close Price
Timeframe: 1H
Operator: Less Than
Second Condition: Simple Moving Average (20)
Timeframe: 1H

AND

First Condition: Standard Deviation (20, 1)
Timeframe: 1H
Operator: Less Than
Second Condition: Value
Value: 0.015
```

**Stop Loss Orders (SHORT)**

```
Rule 1: Stop loss - Extreme volatility spike
First Condition: Standard Deviation (20, 1)
Timeframe: 1H
Operator: Greater Than
Second Condition: Value
Value: 0.08

OR

Rule 2: Stop loss - Trend reversal with volatility
First Condition: Close Price
Timeframe: 1H
Operator: Greater Than
Second Condition: Simple Moving Average (50)
Timeframe: 1H

AND

First Condition: Standard Deviation (20, 1)
Timeframe: 1H
Operator: Greater Than
Second Condition: Simple Moving Average (5)
Timeframe: 1H

OR

Rule 3: Stop loss - Low volatility breakout
First Condition: Close Price
Timeframe: 1H
Operator: Greater Than
Second Condition: Simple Moving Average (20)
Timeframe: 1H

AND

First Condition: Standard Deviation (20, 1)
Timeframe: 1H
Operator: Less Than
Second Condition: Value
Value: 0.01
```

### Advanced Strategy Combinations

#### Volatility Regime Strategy Selection

{% tabs %}
{% tab title="Setup" %}
**Strategy Selection Based on Standard Deviation:**

* **High StdDev (>2x average):** Trend-following strategies
* **Medium StdDev (0.5-2x average):** Balanced strategies
* **Low StdDev (<0.5x average):** Mean-reversion strategies
* **Expanding StdDev:** Prepare for breakouts/breakdowns
  {% endtab %}

{% tab title="Execution" %}
**High Volatility:** Trend-following with wider stops\
**Low Volatility:** Mean-reversion with tighter stops\
**Expanding Volatility:** Breakout strategies with volume confirmation
{% endtab %}
{% endtabs %}

#### Multi-Timeframe Volatility Analysis

{% hint style="info" %}
**Setup Process:**

1. Analyze Standard Deviation across multiple timeframes
2. Identify volatility regime on each timeframe
3. Select appropriate strategy for each timeframe
4. Execute when volatility patterns align

**Execution:**

* **Base Order:** Standard Deviation-based strategy selection
* **Additional:** Volatility confirmation across timeframes
* **Take Profit:** Volatility-based targets and exhaustion
* **Stop Loss:** Volatility-adjusted stops
  {% endhint %}

#### Bollinger Band Width Strategy

{% tabs %}
{% tab title="Band Contraction" %}
**Setup:** Standard Deviation contracting (bands narrowing)\
**Signal:** Low volatility before potential breakout\
**Entry:** Prepare for volatility expansion\
**Target:** Volatility expansion and trend development
{% endtab %}

{% tab title="Band Expansion" %}
**Setup:** Standard Deviation expanding (bands widening)\
**Signal:** High volatility and trending conditions\
**Entry:** Trend-following strategies\
**Target:** Volatility contraction and mean reversion
{% endtab %}
{% endtabs %}

### Risk Management Guidelines

#### Volatility-Based Position Sizing

| StdDev Level             | Position Size    | Risk Level | Strategy Type   |
| ------------------------ | ---------------- | ---------- | --------------- |
| **Very Low (<0.5x avg)** | Increased (125%) | Low        | Mean reversion  |
| **Low (0.5-1x avg)**     | Standard (100%)  | Normal     | Balanced        |
| **High (1-2x avg)**      | Reduced (75%)    | High       | Trend following |
| **Very High (>2x avg)**  | Minimal (50%)    | Very High  | Breakout only   |

#### Standard Deviation Reliability Factors

{% tabs %}
{% tab title="High Reliability" %}
✅ Consistent StdDev patterns across timeframes\
✅ Volume confirmation of volatility changes\
✅ Clear volatility regime identification\
✅ StdDev aligns with market conditions
{% endtab %}

{% tab title="Low Reliability" %}
❌ Artificial volatility from news events\
❌ Very short timeframes with noise\
❌ Conflicting volatility signals across timeframes\
❌ StdDev without price action confirmation
{% endtab %}
{% endtabs %}

### Best Practices

#### For High Volatility Periods

{% hint style="success" %}

1. **Trend following** - Use trend-following strategies when StdDev is high
2. **Wider stops** - Increase stop-loss distances based on StdDev multiples
3. **Reduced size** - Decrease position sizes to manage higher risk
4. **Volume confirmation** - Ensure volume supports volatility moves
   {% endhint %}

#### For Low Volatility Periods

{% hint style="success" %}

1. **Mean reversion** - Use mean-reversion strategies when StdDev is low
2. **Tighter stops** - Use smaller stop-loss distances
3. **Increased size** - Can use larger position sizes due to lower risk
4. **Breakout preparation** - Prepare for potential volatility expansion
   {% endhint %}

#### Common Mistakes to Avoid

{% hint style="danger" %}

* **Ignoring volatility** - Not adjusting strategies based on current StdDev
* **Fixed parameters** - Using fixed stops instead of volatility-adjusted stops
* **Wrong strategy** - Using trend-following in low volatility or mean-reversion in high volatility
* **News events** - Trading during artificial volatility spikes
  {% endhint %}

### Market Conditions Analysis

| Market Type              | LONG Strategy Effectiveness  | SHORT Strategy Effectiveness  |
| ------------------------ | ---------------------------- | ----------------------------- |
| **High StdDev Trending** | 🟢 High (trend following)    | 🟢 High (trend following)     |
| **Low StdDev Ranging**   | 🟡 Medium (mean reversion)   | 🟡 Medium (mean reversion)    |
| **Expanding StdDev**     | 🟢 High (breakout potential) | 🟢 High (breakdown potential) |
| **Contracting StdDev**   | 🔴 Low (await expansion)     | 🔴 Low (await expansion)      |
| **Extreme StdDev**       | 🔴 Low (high risk)           | 🔴 Low (high risk)            |

### Related Indicators

| Indicator              | Relationship                     | Link                                                                                                                                                   |
| ---------------------- | -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Bollinger Bands**    | Uses StdDev for band calculation | [Bollinger Bands Upper](https://docs.skyrexio.com/strategy-builder/built-in-conditions/volatility-indicators/bollinger-bands-upper-20-2)               |
| **Average True Range** | Alternative volatility measure   | [Average True Range](https://docs.skyrexio.com/strategy-builder/built-in-conditions/volatility-indicators/average-true-range-14)                       |
| **Normalized ATR**     | Percentage-based volatility      | [Normalized Average True Range](https://docs.skyrexio.com/strategy-builder/built-in-conditions/volatility-indicators/normalized-average-true-range-14) |
| **Volume**             | Confirms volatility moves        | [Volume](https://docs.skyrexio.com/strategy-builder/built-in-conditions/volume-data/volume)                                                            |

### Conclusion

{% hint style="info" %}
Standard Deviation is a fundamental volatility measurement tool that's essential for both LONG and SHORT strategies. Its primary value lies in strategy selection, risk management, and position sizing rather than directional signals.
{% endhint %}

#### Key Takeaways

{% hint style="success" %}

* **PRIMARY USE**: Volatility measurement and strategy selection
* **SECONDARY USE**: Risk management and position sizing
* **ALWAYS**: Adjust strategies and position sizes based on current StdDev levels
* **REMEMBER**: StdDev measures volatility, not direction - use for strategy selection
  {% endhint %}

Success with Standard Deviation requires understanding that it's primarily a risk management and strategy selection tool. Use it to identify the current volatility regime and select appropriate strategies: trend-following for high volatility, mean-reversion for low volatility.

{% hint style="info" %}
**Ready to Build Your Own Strategy?**

Try our free AI-powered Strategy Builder at [app.skyrexio.com](https://app.skyrexio.com) and start creating professional trading strategies today. No coding required!
{% endhint %}


---

# 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://docs.skyrexio.com/strategy-builder/built-in-conditions/volatility-indicators/standard-deviation-20-1.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.
