Purpose of the Standard Deviation
The Standard Deviation measures how widely price moves around its moving average. A high value means high volatility; a low value means a quiet market. The result is a price distance (for example 0.0012 on EURUSD is 12 pips), just like the Average True Range.
How It Works
When you select Standard Deviation in the Trade Rule block, you can configure it with the following settings:
Period of Standard Deviation
The number of candles used for the calculation (standard: 20).
Shift of Standard Deviation (Advanced Option)
Moves the line forward or backward on the chart by a set number of candles.
MA Method of Standard Deviation
Method used to calculate the moving average.
Simple: Equal weight to all values.
Exponential: More weight on recent data.
Smoothed: Longer-term smoothing with reduced noise.
Weighted: Highest weight on the most recent data, decreasing linearly.
Applied Price of Standard Deviation (What it is calculated from)
Close Price: Uses the candle's closing price.
Open Price: Uses the candle's opening price.
High Price: Uses the highest price in the candle.
Low Price: Uses the lowest price in the candle.
Median Price: (High + Low) ÷ 2
Typical Price: (High + Low + Close) ÷ 3
Weighted Price: (High + Low + Open + Close) ÷ 4
Time Frame of Standard Deviation
Sets the chart time frame for the Standard Deviation calculation.
Can be replaced with a variable or input for quick testing and optimization.
Candle ID of Standard Deviation
Defines which candle the calculation starts from.
0: Current candle (still forming).
1: Most recently closed candle.
Higher IDs refer to older candles.
Adjust of Standard Deviation (Modify the Result)
Apply an adjustment to the calculated value by adding, subtracting, multiplying, or dividing by a number.
Example
If you set:
Period: 20
MA Method: Simple
Applied Price: Close
Candle ID: 1
You get the Standard Deviation of the last 20 closes for the most recently closed candle, as a price distance.
Use Cases
Trade only when volatility is high enough (Standard Deviation above a chosen level).
Detect volatility squeezes when it falls to low levels.
Can also be used as a Custom fraction (distance) stop-loss or take-profit, for example 2 × Standard Deviation via Adjust.
⚠ Tip: Standard Deviation values depend on the symbol's price scale. Values that suit EURUSD will not suit XAUUSD, so test per symbol.

