本页源码来自 TradingView 公开发布的开源脚本,版权归原作者所有, 请遵循其原始许可(Pine 脚本常见 CC BY-NC-SA / MPL-2.0 / MIT)。 本项目仅用于研究检索与许可范围内的移植。
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Rohit_Garg
// Chandelier Exit (CE) is a volatility-based indicator developed by "Chuck Le Beau", ATR is used to measure the Volatility.
// It identifies stop loss exit points for long and short trading positions.
//@version=4
study("Chandelier Exit", shorttitle="CE", overlay=true)
period = input(22, title="ATR Period", minval=1)
mult = input(3.00, title="ATR Multiplier", minval=1.00)
ce_l = highest(high, period) - atr(period)*mult
ce_s = lowest(low, period) + atr(period)*mult
plot(ce_l, "CE Long", color=color.red)
plot(ce_s, "CE Short", color=color.green)