mickes

Trailing stop

mickes Cập nhật   
Hi all!

This script helps to alert you when a trailing stop is hit. More specifically it alerts you when the low of the candle crosses below your trailing stop. A trailing stop follows a price positive movements. It raises your stop when price goes up, but keeps it at the same level if price goes down, so it "locks" in your profit. You define your long entry bar and choose one of the following methods for the stop:

ATR
The Average True Range (ATR) is popular to trail stops. The trailing stop is raised by the low minus the ATR (times a factor that can be set under the settings for ATR).

EMA
The Exponential Moving Average (EMA) can be used to trail your stop. When the low goes below the EMA an alert is sent about the stop. Its length can be set in the settings.

SMA
The Simple Moving Average (SMA) can be used to trail your stop. When the low goes below the SMA an alert is sent about the stop. Its length can be set in the settings.

Source
An external source can be useful as a stop signal. You can use this option that will stop you out when the signal returns anything else than "na". E.g. if you want a stop when KivancOzbilgic script "SuperTrend" (www.tradingview.com/script/r6dAP7yi/) turns red, you set the source to "Supertrend: Down Trend". This option will not draw pretty things on the chart, but it will alert you!

Please note that this is for long entries only.

Best of trading luck!
Phát hành các Ghi chú:
  • Only alert once per bar
  • Some refactoring
  • Error if source is the method and the input is close only on the first bar
Phát hành các Ghi chú:
Hi!

• Force the user to set the entry for the trailing stop loss
• The trailing stop line is drawn until it's broken
• Code refactoring
• Only set if the stop is hit, not the bar index'

Good luck trading!
Phát hành các Ghi chú:
Hi all!

Here's a small but important update.

∙ Add option to force the bar to be closed
∙ Add option to select price (open, high, low or close)

Good luck trading!
Mã nguồn mở

Với tinh thần TradingView, tác giả của tập lệnh này đã xuất bản nó dưới dạng mã nguồn mở, vì vậy các nhà giao dịch có thể hiểu và xác minh nó. Chúc mừng tác giả! Bạn có thể sử dụng mã này miễn phí, nhưng việc sử dụng lại mã này trong một ấn phẩm chịu sự điều chỉnh của Nội quy nội bộ. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ.

Thông báo miễn trừ trách nhiệm

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?