PROTECTED SOURCE SCRIPT
CSA5Steps ATR Data Window

Indicators can be used to create a trailing stop-loss, and some are designed specifically for this function. When using an indicator-based trailing stop-loss, you have to manually move the stop-loss to reflect the information shown on the indicator. Many trailing stop-loss indicators are based on the Average True Range (ATR), which measures how much an asset typically moves over a given time frame.
If a forex pair typically moves seven pips every 10 minutes (the ATR would show this reading on the chart if using 10-minute price bars), the stop-loss could be trailed at a multiple of the ATR. For example, assume you buy a forex pair at 1.1520 and place an initial stop-loss at 1.1506; this is a risk of 14 pips. If the price moves in your favor, continue to trail the stop-loss 14 pips behind the highest price witnessed since entry. If the price rises to 1.1530, the stop-loss is moved up to 1.1516 (which is 1.1530 - 0.0014). Continue to do this until the price eventually hits the stop-loss and closes the trade.
If a forex pair typically moves seven pips every 10 minutes (the ATR would show this reading on the chart if using 10-minute price bars), the stop-loss could be trailed at a multiple of the ATR. For example, assume you buy a forex pair at 1.1520 and place an initial stop-loss at 1.1506; this is a risk of 14 pips. If the price moves in your favor, continue to trail the stop-loss 14 pips behind the highest price witnessed since entry. If the price rises to 1.1530, the stop-loss is moved up to 1.1516 (which is 1.1530 - 0.0014). Continue to do this until the price eventually hits the stop-loss and closes the trade.
Mã được bảo vệ
Tập lệnh này được đăng dưới dạng mã nguồn đóng. Tuy nhiên, bạn có thể sử dụng tự do và không giới hạn – tìm hiểu thêm tại đây.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã được bảo vệ
Tập lệnh này được đăng dưới dạng mã nguồn đóng. Tuy nhiên, bạn có thể sử dụng tự do và không giới hạn – tìm hiểu thêm tại đây.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.