Rogers-Satchell Volatility (Rogers-Satchell)
A volatility estimate from each bar's open, high, low and close that does not mistake a trend for volatility, averaged over the period and scaled to a year by the annualization.
It measures volatility as a fraction.
01The study, live
Computed by Bentrix’s own code over the same synthetic bars on every page — an illustration of how the study behaves, not a market.
What this figure shows
The figure is computed over 300 sample bars. Rogers-Satchell has no value on the first 9 — the bars it needs before it can answer — and its first value stands on bar 10. Its line runs between 0.0056 and 0.0125 on these bars, and the last value is 0.009. Counting the conditions the study declares on these bars: turns up 78 times; turns down 79 times. Press a condition under the figure to see each place marked. As states rather than moments: is rising on 142 bars; is falling on 148 bars.
02Its parts, named
03What you see
An estimate of volatility from each bar's open, high, low and close, rather than from closes alone.
A line in its own pane: an estimate of volatility made from the open, high, low and close of each bar, expressed as an annual figure. Unlike a deviation of closes, it does not mistake a steady trend for volatility.
04Where it comes from
L. C. G. Rogers and S. E. Satchell published the estimator in 1991; it remains accurate when the market trends during the bar.
05The formula
σ²_RS = 1/N Σ[i=1..N] [ ln Hᵢ/Cᵢ ln Hᵢ/Oᵢ + ln Lᵢ/Cᵢ ln Lᵢ/Oᵢ], RS = √A √σ²_RS
06A worked example
Take the last bar of the sample: open 24, high 27, low 23, close 26.
ln(27/26) = 0.0377 and ln(27/24) = 0.1178; their product is 0.00445. ln(23/26) = -0.1226 and ln(23/24) = -0.0426; their product is 0.00522.
The bar's term is the sum, 0.00966. Averaging the terms of the last three bars gives 0.00768; its square root is 0.0876 per bar, and times √252 the annual figure is 1.391 — about 139 % a year on these (deliberately wide) sample bars.
A bar that opens at its low and closes at its high — a pure trend bar — has a term of exactly zero: ln(H/C) and ln(L/O) are both zero. That is the estimator's point.
07Built in Assay
The same study written in Assay, Bentrix’s script language, and drawn by Bentrix itself as the script’s graph: each block is one step of the formula. On the ladder the steps stand in the script’s order, one a row; on the board each wire carries a value from the block that gives it to the block that reads it, left to right. The script computes exactly what the study computes — Bentrix checks the two against each other, candle by candle.
//@version=6 indicator("Rogers-Satchell Volatility") length = input.int(10, "Length") annualization = input.float(252.0, "Bars a year") // One bar's variance, read from how far its high and its low reached against its open and its close. term = math.log(high / close) * math.log(high / open) + math.log(low / close) * math.log(low / open) total = math.sum(term, length) // The window's average, its square root, then scaled up to a year. volatility = na(total) ? na : total > 0 ? math.sqrt(annualization) * math.sqrt(total / length) : 0.0 plot(volatility, "Rogers-Satchell")
Paste it into the Assay IDE to put it on a chart, or to change it. Looking at the graph is free in every package; editing it as blocks is Plus.
08Readings — what traders look for
Read as how much prices moved within bars recently, using all four prices: a rising line says the bars have been reaching further from their opens and closes, a falling one that they have been contained.
How a reading of it fails. The estimator measures what happens inside bars. On a market that gaps between sessions the gaps are not in it, so on daily bars of a stock it reads lower than the volatility of the closes; and on a bar that opens at its low and closes at its high — a pure trend bar — it reads zero, however large the bar.
09In different markets and timeframes
The Rogers–Satchell estimator measures volatility from the open, high, low and close of each bar and is unaffected by a steady trend, which inflates a deviation of closes. It does not see gaps between bars.
10With other studies
Read beside the standard deviation and the ATR; in a trend the three part, and that is the point.
11What it does not tell you
It estimates how much price moved around inside the bars. It does not see the move from one bar's close to the next bar's open: on a market that gaps overnight a large part of the real volatility is outside it.
12Inputs and defaults
- 1Time Period — 10Number of bars in the window
- 2Annualization — 252Periods per year; 1 leaves the per-bar figure
- 3Timeframe — ChartThe chart's own by default; any higher one, read on the last closed candle. A finer one is never offered.
- 4Wait for the candle to close — OnThe value of a higher timeframe is taken only from a candle that has finished.
What each input changes
- Time PeriodThe number of bars looked back over. Longer: steadier and later. Shorter: quicker and noisier.
- AnnualizationHow many bars make a year, for turning the per-bar figure into an annual one: 252 for daily bars. On another timeframe the number has to be changed to match, or the figure is not annual.
- In use10 bars and 252 bars a year by default; the yearly figure has to match the timeframe.
13Limits and common misreadings
Blind to gaps. Overnight moves between bars are not measured; the Yang–Zhang estimator was devised to add them.
The annual factor is the trader's. With 252 on an hourly chart the figure is not an annual volatility.
Needs honest highs and lows. On thin data, where the recorded high and low miss part of the real range, it reads low.
14Conditions an alert or a strategy can watch
an event happens on one bar a state holds on every bar while it lasts
These are the conditions the study itself declares — the same rules the alert editor and the strategy engine read, and the ones the figure's chips show.
15Practise it in the laboratory
Put Rogers–Satchell 10 and StdDev 10 in two panes and replay a smooth, steady trend: the deviation of closes rises with the trend while this estimate stays level.
Open the laboratory17On pages of their own
18In Bentrix
- From the menu: a chart's Indicators button › Volatility › Rogers-Satchell, or type Rogers-Satchell in its search.
- Its settings: the settings card opens when it is added; its legend's name opens it again.
19From an agent or a program
Two tools reach it. study_values computes it over a workbench’s candles up to the clock — no chart needed — and study_attach puts it on a chart, where it is drawn and saved with the chart ({"chart": "<chart uri>", "kind": "rogers_satchell"}).
The study, as a chart files it
This is a new Rogers-Satchell’s entry — its kind, its calculation, the price it reads and its settings. Change a setting here to read it with other inputs.
{
"applied": "close",
"convention": "talib",
"kind": "rogers_satchell",
"settings": {
"shape": "ta",
"values": {
"optInAnnualization": 252.0,
"optInTimePeriod": 10.0
}
}
}An agent
An agent calls the MCP tool with it:
{
"name": "study_values",
"arguments": {
"bench": "bentrix://lab/\u2026/bench/\u2026",
"symbol": "EURUSD",
"timeframe": "H1",
"limit": 5,
"study": {
"applied": "close",
"convention": "talib",
"kind": "rogers_satchell",
"settings": {
"shape": "ta",
"values": {
"optInAnnualization": 252.0,
"optInTimePeriod": 10.0
}
}
}
}
}A program
A program does the same in its language — bench and market as in the built-in indicators guide:
Python
values = client.study.values(bench, market, "H1", {"applied": "close", "convention": "talib", "kind": "rogers_satchell", "settings": {"shape": "ta", "values": {"optInAnnualization": 252.0, "optInTimePeriod": 10.0}}}, limit=5)
print("times:", values["times"])
for line in values["lines"]:
print("line:", line["line"])
print(" newest values:", line["values"])JavaScript
const values = await client.study.values({ bench, symbol: market, timeframe: "H1", study: { "applied": "close", "convention": "talib", "kind": "rogers_satchell", "settings": { "shape": "ta", "values": { "optInAnnualization": 252.0, "optInTimePeriod": 10.0 } } }, limit: 5 });
console.log("times:", values.times);
for (const line of values.lines) {
console.log("line:", line.line);
console.log(" newest values:", line.values);
}C#
var values = await client.Study.Values(bench, market, "H1", new Dictionary<string, object?> { ["applied"] = "close", ["convention"] = "talib", ["kind"] = "rogers_satchell", ["settings"] = new Dictionary<string, object?> { ["shape"] = "ta", ["values"] = new Dictionary<string, object?> { ["optInAnnualization"] = 252.0, ["optInTimePeriod"] = 10.0 } } }, limit: 5);
Console.WriteLine($"times: {values!["times"]!}");
foreach (var line in values!["lines"]!.AsArray())
{
Console.WriteLine($"line: {line!["line"]!}");
Console.WriteLine($" newest values: {line!["values"]!}");
}Go
values := must(client.Study.Values(ctx, mcp.StudyValuesArgs{Bench: bench, Symbol: market, Timeframe: "H1", Study: map[string]any{"applied": "close", "convention": "talib", "kind": "rogers_satchell", "settings": map[string]any{"shape": "ta", "values": map[string]any{"optInAnnualization": 252.0, "optInTimePeriod": 10.0}}}, Limit: mcp.Ptr[int64](5)}))
fmt.Println("times:", at(values, "times"))
for _, line := range at(values, "lines").([]any) {
fmt.Println("line:", at(line, "line"))
fmt.Println(" newest values:", at(line, "values"))
}Java
Object values = client.study.values(new Bentrix.StudyApi.ValuesArgs(bench, market, "H1", obj("applied", "close", "convention", "talib", "kind", "rogers_satchell", "settings", obj("shape", "ta", "values", obj("optInAnnualization", 252.0, "optInTimePeriod", 10.0)))).limit(5L));
System.out.println("times:" + " " + at(values, "times"));
for (Object line : (List<Object>) at(values, "lines")) {
System.out.println("line:" + " " + at(line, "line"));
System.out.println(" newest values:" + " " + at(line, "values"));
}C++
auto values = client.study.values_(StudyApi::ValuesArgs(bench, market, "H1", Json::Object{{"applied", "close"}, {"convention", "talib"}, {"kind", "rogers_satchell"}, {"settings", Json::Object{{"shape", "ta"}, {"values", Json::Object{{"optInAnnualization", 252.0}, {"optInTimePeriod", 10.0}}}}}}).limit(5));
std::cout << "times:" << " " << values["times"].dump() << std::endl;
for (const Json &line : values["lines"].arr()) {
std::cout << "line:" << " " << line["line"].dump() << std::endl;
std::cout << " newest values:" << " " << line["values"].dump() << std::endl;
}Julia
values = client.study.values(bench, market, "H1", Dict{String,Any}("applied" => "close", "convention" => "talib", "kind" => "rogers_satchell", "settings" => Dict{String,Any}("shape" => "ta", "values" => Dict{String,Any}("optInAnnualization" => 252.0, "optInTimePeriod" => 10.0))); limit = 5)
println("times:", " ", values["times"])
for line in values["lines"]
println("line:", " ", line["line"])
println(" newest values:", " ", line["values"])
endR
values <- client$study$values(bench, market, "H1", list(applied = "close", convention = "talib", kind = "rogers_satchell", settings = list(shape = "ta", values = list(optInAnnualization = 252.0, optInTimePeriod = 10.0))), limit = 5)
cat("times:", format(values$times), "\n")
for (line in values$lines) {
cat("line:", format(line$line), "\n")
cat(" newest values:", format(line$values), "\n")
}Rust
let values = client.study().values(mcp::StudyValuesArgs::new(bench.clone(), market.clone(), "H1", serde_json::json!({"applied": "close", "convention": "talib", "kind": "rogers_satchell", "settings": {"shape": "ta", "values": {"optInAnnualization": 252.0, "optInTimePeriod": 10.0}}})).limit(5))?;
println!("times: {}", values["times"]);
for line in values["lines"].as_array().into_iter().flatten() {
println!("line: {}", line["line"]);
println!(" newest values: {}", line["values"]);
}Reading the answer
times— the candles’ open times, in milliseconds since 1970 (UTC), oldest first.lines— one entry per line, in this order, each with itslinename and itsvalues;values[i]belongs to the candle attimes[i].- The last value is the candle at the clock’s, which may still be forming: it changes until that candle closes, as on the chart. Nothing after the clock is ever computed.
nullis a candle with no value yet — the warm-up, about 1 × the period at the start of the history.
line | What it is |
|---|---|
Main | the indicator's own value |
In a strategy
Filed under a key of your choice in a strategy document’s studies — here rogers_satchell: {"rogers_satchell": {"applied": "close", "convention": "talib", "kind": "rogers_satchell", "settings": {"shape": "ta", "values": {"optInAnnualization": 252.0, "optInTimePeriod": 10.0}}}} — its rules can name:
| Write | What it is |
|---|---|
rogers_satchell | its main line, as a value in a compare |
{"cond": "rogers_satchell:line.turns_up"} | a condition it declares itself |
{"cond": "rogers_satchell:line.turns_down"} | a condition it declares itself |
{"cond": "rogers_satchell:line.rising"} | a condition it declares itself |
{"cond": "rogers_satchell:line.falling"} | a condition it declares itself |
20Sources
- Rogers, L. C. G. & Satchell, S. E. "Estimating Variance from High, Low and Closing Prices." Annals of Applied Probability, vol. 1, no. 4, 1991.
Bentrix 0.1.382Every number, name and default on these pages is read from the application itself.What is comingWhat changed