SafeZone Stop
The SafeZone Stop of Alexander Elder places the stop outside the noise of the market instead of a fixed number of Average True Ranges away. In an uptrend, Elder regards the part of a period’s low below the previous low, the downside penetration, as noise: the long stop lies below the previous low by a multiple of the average of those penetrations, so that ordinary dips do not reach it. The short stop lies above the previous high by a multiple of the average upside penetration.
The formula for the SafeZone Stop starts from the penetrations of each period, the part of the low below the previous low and the part of the high above the previous high, zero when there is none:
\[\text{Downside Penetration} = \max\left(\text{Low}_{t-1} - \text{Low}, 0\right)\] \[\text{Upside Penetration} = \max\left(\text{High} - \text{High}_{t-1}, 0\right)\]A count marks the periods with a penetration:
\[\text{Downside Count} = 1 \quad \text{if } \text{Downside Penetration} > 0\] \[\text{Downside Count} = 0 \quad \text{if } \text{Downside Penetration} = 0\] \[\text{Upside Count} = 1 \quad \text{if } \text{Upside Penetration} > 0\] \[\text{Upside Count} = 0 \quad \text{if } \text{Upside Penetration} = 0\]The average penetration over the last n periods counts only the periods that had one:
\[\text{Average Downside Penetration} = \frac{\text{Sum}(\text{Downside Penetration}, n)}{\text{Sum}(\text{Downside Count}, n)}\] \[\text{Average Upside Penetration} = \frac{\text{Sum}(\text{Upside Penetration}, n)}{\text{Sum}(\text{Upside Count}, n)}\]The long exit lies k average downside penetrations below the previous low, and the short exit k average upside penetrations above the previous high:
\[\text{Long Exit} = \text{Low}_{t-1} - k \cdot \text{Average Downside Penetration}\] \[\text{Short Exit} = \text{High}_{t-1} + k \cdot \text{Average Upside Penetration}\]Elder never lowers the stop of a long position, or raises that of a short one, once a trade is open. A close beyond the stop ends the trade. Because the stop follows the previous low or high rather than the extreme of the trend, it sits closer to the price than the Chandelier Exit and closes trades sooner.
Also known as: SafeZone, Elder’s SafeZone Stop, Elder SafeZone.
In the Finance Toolkit this is get_chandelier_exit with method="safezone", the same function as Chandelier Exit.
Example · TSLA · 2025
Install the Finance Toolkit with pip install financetoolkit -U, then call get_chandelier_exit:
from financetoolkit import Toolkit
toolkit = Toolkit(
tickers=["TSLA"],
api_key="FINANCIAL_MODELING_PREP_KEY",
start_date="2025-01-01",
end_date="2025-12-31",
)
toolkit.technicals.get_chandelier_exit(method="safezone").xs("TSLA", level=1, axis="columns")
| Parameter | Type | Description | Example |
|---|---|---|---|
period | str | The time period to consider for historical data. Options are: “intraday” (intraday prices), “daily” (daily prices), “weekly” (weekly prices), “monthly” (monthly prices), “quarterly” (quarterly prices), “yearly” (yearly prices). Defaults to “daily”. | "weekly" |
close_column | str | The column name for closing prices in the historical data. Defaults to “Adj Close”, in which case the open, high and low prices are adjusted for dividends in the same way. | "Close" |
window | int | None | The number of periods of the highest high, the lowest low and the Average True Range, or of the average penetration of the SafeZone Stop. Defaults to None, which uses 22, about a month of trading days, as defined by Le Beau, and 10 for the SafeZone Stop, as Elder uses. | 20 |
multiplier | float | None | The number of Average True Ranges the exits sit from the highest high and the lowest low, or of average penetrations from the previous low and high. Defaults to None, which uses 3.0, as defined by Le Beau, and 2.0 for the SafeZone Stop, as Elder uses. | 2.0 |
method | str | The stop. Options are: “standard” (Chandelier Exit), “safezone” (SafeZone Stop). Defaults to “standard”. | "standard" |
rounding | int | None | The number of decimals to round the results to. Defaults to None, which uses the rounding of the Toolkit (4 unless set otherwise). | 2 |
growth | bool | Whether to calculate the growth of the Long Exit and Short Exit. Defaults to False. | True |
lag | int | list[int] | The lag to use for the growth calculation. Defaults to 1. | 4 |
standardize | bool | Whether to standardize (Z-Score) the result. When combined with growth=True, standardizes the growth values instead of the raw values. Defaults to False. | True |
transform | str | list[str] | None | Time series steps applied in order, such as “sma:12” (moving average), “ema:12”, “std:12”, “zscore:60”, “percentile:120”, “yoy”, “pct_change:3,annualize:3”, “log”, “diff”, “cumsum” or “hp_trend” and “hp_cycle” (Hodrick-Prescott), before growth. A window needs that many periods of history, so the first periods can be empty. Defaults to None. | None |
show_columns | str | list[str] | None | The columns to keep, a name or a list of names, matched on every column level, or the rows when no column has those names (such as the line items of a financial statement). Names that do not exist are logged, and when none exist the result is returned in full. Defaults to None, which keeps every column. | None, which keeps every column |
Which returns:
| Date | Long Exit | Short Exit |
|---|---|---|
| 2025-01-02 | 372.520 | 446.080 |
| 2025-01-03 | 347.446 | 418.180 |
| 2025-01-06 | 351.920 | 438.060 |
| 2025-01-07 | 371.063 | 452.610 |
| 2025-01-08 | 359.240 | 440.510 |
| 2025-01-10 | 358.146 | 421.090 |
| 2025-01-13 | 348.036 | 418.850 |
| 2025-01-14 | 354.113 | 426.986 |
| 2025-01-15 | 367.692 | 444.357 |
| 2025-01-16 | 378.705 | 455.488 |
| 2025-01-17 | 392.857 | 450.653 |
| 2025-01-21 | 400.825 | 464.064 |
| 2025-01-22 | 387.385 | 456.330 |
| 2025-01-23 | 398.695 | 451.130 |
| 2025-01-24 | 392.770 | 443.860 |
| 2025-01-27 | 386.265 | 442.010 |
| 2025-01-28 | 372.388 | 434.523 |
| 2025-01-29 | 371.983 | 423.490 |
| 2025-01-30 | 372.017 | 428.240 |
| 2025-01-31 | 371.947 | 437.260 |
| 2025-02-03 | 383.690 | 441.390 |
| 2025-02-04 | 358.029 | 406.657 |
| 2025-02-05 | 365.642 | 411.487 |
| 2025-02-06 | 358.095 | 405.877 |
| 2025-02-07 | 345.827 | 391.090 |
| 2025-02-10 | 344.725 | 396.240 |
| 2025-02-11 | 329.168 | 378.390 |
| 2025-02-12 | 301.286 | 365.060 |
| 2025-02-13 | 301.360 | 361.280 |
| 2025-02-14 | 315.090 | 371.480 |
| 2025-02-18 | 324.980 | 374.790 |
| 2025-02-19 | 327.500 | 373.595 |
| 2025-02-20 | 331.230 | 381.835 |
| 2025-02-21 | 325.068 | 376.795 |
| 2025-02-24 | 308.736 | 370.873 |
| 2025-02-25 | 291.968 | 358.293 |
| 2025-02-26 | 270.998 | 344.783 |
| 2025-02-27 | 263.777 | 324.893 |
| 2025-02-28 | 258.003 | 308.780 |
| 2025-03-03 | 250.723 | 312.180 |
| 2025-03-04 | 253.417 | 322.240 |
| 2025-03-05 | 237.958 | 304.470 |
| 2025-03-06 | 243.322 | 299.670 |
| 2025-03-07 | 236.705 | 292.770 |
| 2025-03-10 | 222.162 | 286.370 |
| 2025-03-11 | 197.550 | 273.490 |
| 2025-03-12 | 193.994 | 261.900 |
| 2025-03-13 | 217.691 | 276.680 |
| 2025-03-14 | 207.717 | 267.043 |
| 2025-03-17 | 217.136 | 269.650 |
| 2025-03-18 | 210.617 | 263.470 |
| 2025-03-19 | 200.097 | 249.687 |
| 2025-03-20 | 205.883 | 260.997 |
| 2025-03-21 | 205.786 | 258.450 |
| 2025-03-24 | 219.585 | 277.528 |
| 2025-03-25 | 238.363 | 305.167 |
| 2025-03-26 | 255.420 | 314.120 |
| 2025-03-27 | 251.030 | 308.817 |
| 2025-03-28 | 254.585 | 319.234 |
| 2025-03-31 | 238.695 | 303.484 |
| 2025-04-01 | 221.207 | 289.010 |
| 2025-04-02 | 238.645 | 304.643 |
| 2025-04-03 | 230.665 | 312.183 |
| 2025-04-04 | 234.822 | 304.324 |
| 2025-04-07 | 206.510 | 281.470 |
| 2025-04-08 | 184.760 | 272.920 |
| 2025-04-09 | 184.320 | 278.255 |
| 2025-04-10 | 190.400 | 307.143 |
| 2025-04-11 | 203.105 | 294.943 |
| 2025-04-14 | 204.533 | 284.110 |
| 2025-04-15 | 209.103 | 285.700 |
| 2025-04-16 | 206.933 | 287.060 |
| 2025-04-17 | 193.283 | 280.280 |
| 2025-04-21 | 204.153 | 272.650 |
| 2025-04-22 | 194.250 | 258.137 |
| 2025-04-23 | 201.310 | 270.565 |
| 2025-04-24 | 215.890 | 275.145 |
| 2025-04-25 | 220.660 | 283.020 |
| 2025-04-28 | 231.090 | 309.087 |
| 2025-04-29 | 243.880 | 319.920 |
| 2025-04-30 | 254.650 | 318.380 |
| 2025-05-01 | 247.200 | 307.473 |
| 2025-05-02 | 256.230 | 311.721 |
| 2025-05-05 | 265.710 | 315.631 |
| 2025-05-06 | 262.967 | 305.650 |
| 2025-05-07 | 262.600 | 293.040 |
| 2025-05-08 | 262.250 | 297.160 |
| 2025-05-09 | 270.660 | 305.683 |
| 2025-05-12 | 281.250 | 325.310 |
| 2025-05-13 | 302.750 | 342.264 |
| 2025-05-14 | 310.927 | 358.240 |
| 2025-05-15 | 331.455 | 371.766 |
| 2025-05-16 | 329.175 | 368.354 |
| 2025-05-19 | 335.010 | 373.834 |
| 2025-05-20 | 325.643 | 365.435 |
| 2025-05-21 | 327.850 | 380.576 |
| 2025-05-22 | 321.460 | 373.240 |
| 2025-05-23 | 320.650 | 371.442 |
| 2025-05-27 | 322.470 | 369.528 |
| 2025-05-28 | 336.580 | 384.470 |
| 2025-05-29 | 345.170 | 381.800 |
| 2025-05-30 | 341.045 | 384.510 |
| 2025-06-02 | 328.542 | 381.940 |
| 2025-06-03 | 316.875 | 365.580 |
| 2025-06-04 | 323.592 | 371.355 |
| 2025-06-05 | 290.006 | 361.555 |
| 2025-06-06 | 226.960 | 340.505 |
| 2025-06-09 | 250.424 | 319.996 |
| 2025-06-10 | 241.134 | 323.282 |
| 2025-06-11 | 269.954 | 343.866 |
| 2025-06-12 | 286.690 | 354.190 |
| 2025-06-13 | 283.433 | 347.684 |
| 2025-06-16 | 277.972 | 348.114 |
| 2025-06-17 | 293.080 | 347.265 |
| 2025-06-18 | 281.028 | 340.256 |
| 2025-06-20 | 300.370 | 341.163 |
| 2025-06-23 | 302.700 | 349.706 |
| 2025-06-24 | 313.567 | 376.333 |
| 2025-06-25 | 319.985 | 371.612 |
| 2025-06-26 | 299.945 | 358.355 |
| 2025-06-27 | 302.920 | 346.405 |
| 2025-06-30 | 298.140 | 349.527 |
| 2025-07-01 | 291.756 | 345.767 |
| 2025-07-02 | 267.990 | 326.500 |
| 2025-07-03 | 278.600 | 337.220 |
| 2025-07-07 | 282.988 | 343.610 |
| 2025-07-08 | 258.998 | 309.790 |
| 2025-07-09 | 269.273 | 317.690 |
| 2025-07-10 | 271.474 | 315.545 |
| 2025-07-11 | 277.924 | 324.240 |
| 2025-07-14 | 281.110 | 328.393 |
| 2025-07-15 | 287.495 | 336.903 |
| 2025-07-16 | 292.527 | 334.117 |
| 2025-07-17 | 294.647 | 333.531 |
| 2025-07-18 | 299.087 | 335.783 |
| 2025-07-21 | 318.450 | 342.688 |
| 2025-07-22 | 321.347 | 349.214 |
| 2025-07-23 | 314.050 | 345.420 |
| 2025-07-24 | 304.830 | 344.689 |
| 2025-07-25 | 276.570 | 321.459 |
| 2025-07-28 | 284.170 | 334.467 |
| 2025-07-29 | 282.100 | 341.327 |
| 2025-07-30 | 291.437 | 338.127 |
| 2025-07-31 | 288.750 | 338.366 |
| 2025-08-01 | 284.492 | 335.485 |
| 2025-08-04 | 276.212 | 321.280 |
| 2025-08-05 | 278.655 | 321.828 |
| 2025-08-06 | 281.155 | 325.050 |
| 2025-08-07 | 293.310 | 331.613 |
| 2025-08-08 | 302.540 | 333.300 |
| 2025-08-11 | 307.360 | 347.593 |
| 2025-08-12 | 323.330 | 359.083 |
| 2025-08-13 | 322.933 | 356.989 |
| 2025-08-14 | 326.673 | 360.709 |
| 2025-08-15 | 322.140 | 352.199 |
| 2025-08-18 | 318.760 | 352.047 |
| 2025-08-19 | 322.525 | 350.333 |
| 2025-08-20 | 316.898 | 354.218 |
| 2025-08-21 | 303.648 | 347.490 |
| 2025-08-22 | 307.728 | 342.320 |
| 2025-08-25 | 308.738 | 356.565 |
| 2025-08-26 | 321.945 | 363.530 |
| 2025-08-27 | 330.635 | 365.808 |
| 2025-08-28 | 335.525 | 369.298 |
| 2025-08-29 | 324.035 | 367.458 |
| 2025-09-02 | 316.280 | 362.658 |
| 2025-09-03 | 307.195 | 349.526 |
| 2025-09-04 | 312.803 | 359.526 |
| 2025-09-05 | 315.773 | 358.047 |
| 2025-09-08 | 328.973 | 370.767 |
| 2025-09-09 | 332.550 | 372.604 |
| 2025-09-10 | 331.530 | 366.210 |
| 2025-09-11 | 333.780 | 375.438 |
| 2025-09-12 | 337.147 | 394.147 |
| 2025-09-15 | 363.120 | 426.541 |
| 2025-09-16 | 400.390 | 455.551 |
| 2025-09-17 | 408.650 | 451.690 |
| 2025-09-18 | 406.890 | 454.173 |
| 2025-09-19 | 413.780 | 456.926 |
| 2025-09-22 | 418.940 | 457.873 |
| 2025-09-23 | 421.960 | 473.383 |
| 2025-09-24 | 416.550 | 468.710 |
| 2025-09-25 | 417.617 | 472.353 |
| 2025-09-26 | 407.667 | 455.967 |
| 2025-09-29 | 409.607 | 454.920 |
| 2025-09-30 | 427.750 | 465.430 |
| 2025-10-01 | 418.627 | 463.527 |
| 2025-10-02 | 427.290 | 482.333 |
| 2025-10-03 | 417.206 | 490.793 |
| 2025-10-06 | 398.216 | 463.903 |
| 2025-10-07 | 418.794 | 470.683 |
| 2025-10-08 | 415.130 | 471.944 |
| 2025-10-09 | 408.426 | 460.594 |
| 2025-10-10 | 407.267 | 456.278 |
| 2025-10-13 | 392.537 | 462.785 |
| 2025-10-14 | 402.300 | 456.545 |
| 2025-10-15 | 400.460 | 448.365 |
| 2025-10-16 | 408.983 | 453.757 |
| 2025-10-17 | 408.090 | 450.340 |
| 2025-10-20 | 410.380 | 453.230 |
| 2025-10-21 | 426.205 | 461.570 |
| 2025-10-22 | 424.730 | 461.070 |
| 2025-10-23 | 409.104 | 456.500 |
| 2025-10-24 | 396.395 | 458.560 |
| 2025-10-27 | 412.665 | 462.140 |
| 2025-10-28 | 416.577 | 471.080 |
| 2025-10-29 | 429.487 | 477.637 |
| 2025-10-30 | 425.190 | 476.337 |
| 2025-10-31 | 412.150 | 465.973 |
| 2025-11-03 | 416.230 | 471.490 |
| 2025-11-04 | 428.105 | 487.560 |
| 2025-11-05 | 422.985 | 473.529 |
| 2025-11-06 | 424.835 | 478.856 |
| 2025-11-07 | 417.106 | 481.303 |
| 2025-11-10 | 403.896 | 453.823 |
| 2025-11-11 | 418.040 | 464.290 |
| 2025-11-12 | 417.571 | 457.110 |
| 2025-11-13 | 406.863 | 456.950 |
| 2025-11-14 | 375.715 | 441.305 |
| 2025-11-17 | 362.155 | 426.845 |
| 2025-11-18 | 379.408 | 438.615 |
| 2025-11-19 | 372.441 | 421.940 |
| 2025-11-20 | 377.763 | 432.840 |
| 2025-11-21 | 374.640 | 450.000 |
| 2025-11-24 | 363.660 | 428.165 |
| 2025-11-25 | 377.973 | 447.085 |
| 2025-11-26 | 380.530 | 443.356 |
| 2025-11-28 | 400.225 | 448.000 |
| 2025-12-01 | 415.860 | 451.190 |
| 2025-12-02 | 415.750 | 449.454 |
| 2025-12-03 | 412.710 | 453.400 |
| 2025-12-04 | 421.700 | 465.478 |
| 2025-12-05 | 435.350 | 468.957 |
| 2025-12-08 | 438.000 | 473.197 |
| 2025-12-09 | 421.590 | 460.007 |
| 2025-12-10 | 422.040 | 462.506 |
| 2025-12-11 | 431.725 | 466.645 |
| 2025-12-12 | 428.445 | 460.973 |
| 2025-12-15 | 426.430 | 479.220 |
| 2025-12-16 | 453.313 | 499.627 |
| 2025-12-17 | 451.483 | 507.522 |
| 2025-12-18 | 451.853 | 511.674 |
| 2025-12-19 | 458.773 | 508.573 |
| 2025-12-22 | 469.610 | 508.056 |
| 2025-12-23 | 480.263 | 518.443 |
| 2025-12-24 | 476.020 | 513.710 |
| 2025-12-26 | 470.130 | 512.640 |
| 2025-12-29 | 462.556 | 509.395 |
| 2025-12-30 | 447.890 | 483.967 |
| 2025-12-31 | 441.820 | 475.240 |
250 rows
References
- Paper Elder, A. (2002). “Come Into My Trading Room.” John Wiley & Sons, which popularised the exit and defines the SafeZone Stop (chapter 9).