ka66

ka66: ATR Stop Channel

ka66 업데이트됨   
ATR Stop Channel: Often used as a dynamic stop loss management tool, this indicator:

  • Calculates the ATR over a configurable period, default 14
  • Based on configurable multipliers, draws a channel of (close + atr-multiple, close - atr-multiple)

The reference point of close is also configurable to allow a different source, e.g. you can use an EMA if you wanted to make a Keltner channel.

The upper channel line can be used for short position stop management, while the bottom one is for long positions. Multipliers can also be configured separately for long vs. short, given that one common market anomaly is that short positions can often have more aggressive stops.

ATR is calculated as the Simple Moving Average of TRs, no fancy weighted averaging. The tradingview atr function uses RMA, an EMA variant used in RSI, I prefer simpler averaging. The lag can be a feature if used well. Additionally, it's easier to reason about.

Note: For a more dedicated and full-featured multi-ATR|Keltner channels however, see my: "ka66: Multi ATR Channels", which is likely better suited for price analysis and channel trading.
릴리즈 노트:
Enhancements

  • Much more consistent use of the chosen centre source line. Previously, there were too many adjustments around high and low when drawing bands, a logical bug really. This is the most important change.
  • Updated to Pine v5
  • Allow different timeframe selection.
  • Allow several different averaging types for the ATR, defaulting to the original Wilder RMA.
  • Display current ATR Price Distance from centre source line in a table.
  • Option to display values in points, but requires the correct divisor to show pips, for example.
  • Add more usage guidance in source code, namely: besides use as a stop channel, also as a no-trade zone with adjustable low-volatility multipliers. And thus, use as a potential breakout identification points, when price goes beyond the low-volatility zone.
릴리즈 노트:
This is a further refinement of the ATR bands, to now allow for trailing stops, and a more explicit choice of centre line using configurable common moving averages.

The key thing to note is that ATR shifts from long to short and vice versa when price closes above or below the stop line, not when it just goes high or low (so you'll see high/low wicks penetrating the the trailing stop band, and the band remains there).

Thus, in a particularly volatile market, you need to adjust the multiplier if you are using it to trail stops. However, note that if your entry is decent, the idea is to get into a smooth trend to actually trail, something with reasonably low (but directional) volatility on the trailing timeframe.

If you enable the Debugging checkbox, you'll see the original bands and how the trailing stop band works. You can show/hide it from the UI settings as needed.

There are a few of these trailing stop indicators on TradingView, mine's not special in terms of function, but I needed to understand the logic if I want to use it to manage risk, and decided to write it myself, with code that is rather more verbose, but clearer, in my view, in its intent.

A recent tweet by Linda Raschke (of Market Wizard fame, and all-round awesome person), showed using trailing stops with a very short ATR period (2 to 3), tracking a price mean, with some deviation/multiple from that mean, capturing a sizeable chunk of the swing when trailed. This is the inspiration behind these latest changes.
오픈 소스 스크립트

이 스크립트의 오써는 참된 트레이딩뷰의 스피릿으로 이 스크립트를 오픈소스로 퍼블리쉬하여 트레이더들로 하여금 이해 및 검증할 수 있도록 하였습니다. 오써를 응원합니다! 스크립트를 무료로 쓸 수 있지만, 다른 퍼블리케이션에서 이 코드를 재사용하는 것은 하우스룰을 따릅니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.

차트에 이 스크립트를 사용하시겠습니까?