robbatt

ATRStopLossFinder

robbatt Cập nhật   
Library "ATRStopLossFinder"
Average True Range Stop Loss Finder
credits to www.tradingview.com/u/veryfid/ for the initial version

stopLossFinder(length, smoothing, multiplier, refHigh, refLow, refClose) Returns the stop losses for an entry on this candle, depending on the ATR
  Parameters:
    length: simple int optional to select the lookback amount of candles
    smoothing: string optional to select the averaging method, options=
    multiplier: simple float optional if you want to tweak the speed the trend changes.
    refHigh: series float optional if you want to use another timeframe or symbol, pass it's 'high' series here
    refLow: series float optional if you want to use another timeframe or symbol, pass it's 'low' series here
    refClose: series float optional if you want to use another timeframe or symbol, pass it's 'close' series here
  Returns: series float stopLossLong, series float stopLossShort, series float atr
Phát hành các Ghi chú:
v2

Added:
atr(length, smoothing, multiplier, refHigh, refLow, refClose) Returns the ATR
  Parameters:
    length: simple int optional to select the lookback amount of candles
    smoothing: string optional to select the averaging method, options=
    multiplier: simple float optional if you want to tweak the speed the trend changes.
    refHigh: series float optional if you want to use another timeframe or symbol, pass it's 'high' series here
    refLow: series float optional if you want to use another timeframe or symbol, pass it's 'low' series here
    refClose: series float optional if you want to use another timeframe or symbol, pass it's 'close' series here
  Returns: series float stopLossLong, series float stopLossShort, series float atr

long(length, smoothing, multiplier, refHigh, refLow, refClose) Returns only the stop loss for a long entry on this candle, depending on the ATR
  Parameters:
    length: simple int optional to select the lookback amount of candles
    smoothing: string optional to select the averaging method, options=
    multiplier: simple float optional if you want to tweak the speed the trend changes.
    refHigh: series float optional if you want to use another timeframe or symbol, pass it's 'high' series here
    refLow: series float optional if you want to use another timeframe or symbol, pass it's 'low' series here
    refClose: series float optional if you want to use another timeframe or symbol, pass it's 'close' series here
  Returns: series float stopLossLong

short(length, smoothing, multiplier, refHigh, refLow, refClose) Returns only the stop loss for a short entry on this candle, depending on the ATR
  Parameters:
    length: simple int optional to select the lookback amount of candles
    smoothing: string optional to select the averaging method, options=
    multiplier: simple float optional if you want to tweak the speed the trend changes.
    refHigh: series float optional if you want to use another timeframe or symbol, pass it's 'high' series here
    refLow: series float optional if you want to use another timeframe or symbol, pass it's 'low' series here
    refClose: series float optional if you want to use another timeframe or symbol, pass it's 'close' series here
  Returns: series float stopLossShort
Phát hành các Ghi chú:
v3

Added:
stopLossTicksFinder(tickValue, length, smoothing, multiplier, refHigh, refLow, refClose) Returns the stop losses for an entry on this candle in ticks, depending on the ATR
  Parameters:
    tickValue: simple float tick value (use getTickValueSymbol)
    length: simple int optional to select the lookback amount of candles
    smoothing: string optional to select the averaging method, options=
    multiplier: simple float optional if you want to tweak the speed the trend changes.
    refHigh: series float optional if you want to use another timeframe or symbol, pass it's 'high' series here
    refLow: series float optional if you want to use another timeframe or symbol, pass it's 'low' series here
    refClose: series float optional if you want to use another timeframe or symbol, pass it's 'close' series here
  Returns: series float stopLossLong, series float stopLossShort, series float atr

longTicks(tickValue, length, smoothing, multiplier, refHigh, refLow, refClose) Returns only the stop loss for a long entry on this candle, depending on the ATR
  Parameters:
    tickValue: simple float tick value (use getTickValueSymbol)
    length: simple int optional to select the lookback amount of candles
    smoothing: string optional to select the averaging method, options=
    multiplier: simple float optional if you want to tweak the speed the trend changes.
    refHigh: series float optional if you want to use another timeframe or symbol, pass it's 'high' series here
    refLow: series float optional if you want to use another timeframe or symbol, pass it's 'low' series here
    refClose: series float optional if you want to use another timeframe or symbol, pass it's 'close' series here
  Returns: series float stopLossLong

shortTicks(tickValue, length, smoothing, multiplier, refHigh, refLow, refClose) Returns only the stop loss for a short entry on this candle, depending on the ATR
  Parameters:
    tickValue: simple float tick value (use getTickValueSymbol)
    length: simple int optional to select the lookback amount of candles
    smoothing: string optional to select the averaging method, options=
    multiplier: simple float optional if you want to tweak the speed the trend changes.
    refHigh: series float optional if you want to use another timeframe or symbol, pass it's 'high' series here
    refLow: series float optional if you want to use another timeframe or symbol, pass it's 'low' series here
    refClose: series float optional if you want to use another timeframe or symbol, pass it's 'close' series here
  Returns: series float stopLossShort
Phát hành các Ghi chú:
v4

Added:
stopLossTicks(tickValue, length, smoothing, multiplier, refHigh, refLow, refClose) Returns the stop losses for an entry on this candle in ticks, depending on the ATR
  Parameters:
    tickValue: simple float tick value (use getTickValueSymbol)
    length: simple int optional to select the lookback amount of candles
    smoothing: string optional to select the averaging method, options=
    multiplier: simple float optional if you want to tweak the speed the trend changes.
    refHigh: series float optional if you want to use another timeframe or symbol, pass it's 'high' series here
    refLow: series float optional if you want to use another timeframe or symbol, pass it's 'low' series here
    refClose: series float optional if you want to use another timeframe or symbol, pass it's 'close' series here
  Returns: series float stopLossTicks

Removed:
stopLossTicksFinder(tickValue, length, smoothing, multiplier, refHigh, refLow, refClose) Returns the stop losses for an entry on this candle in ticks, depending on the ATR
Phát hành các Ghi chú:
v5

Added:
atrTicks(tickValue, length, smoothing, multiplier, refHigh, refLow, refClose) Returns the ATR
  Parameters:
    tickValue: simple float tick value (use getTickValueSymbol)
    length: simple int optional to select the lookback amount of candles
    smoothing: string optional to select the averaging method, options=
    multiplier: simple float optional if you want to tweak the speed the trend changes.
    refHigh: series float optional if you want to use another timeframe or symbol, pass it's 'high' series here
    refLow: series float optional if you want to use another timeframe or symbol, pass it's 'low' series here
    refClose: series float optional if you want to use another timeframe or symbol, pass it's 'close' series here
  Returns: series float stopLossLong, series float stopLossShort, series float atr

Removed:
long(length, smoothing, multiplier, refHigh, refLow, refClose) Returns only the stop loss for a long entry on this candle, depending on the ATR

short(length, smoothing, multiplier, refHigh, refLow, refClose) Returns only the stop loss for a short entry on this candle, depending on the ATR

longTicks(tickValue, length, smoothing, multiplier, refHigh, refLow, refClose) Returns only the stop loss for a long entry on this candle, depending on the ATR

shortTicks(tickValue, length, smoothing, multiplier, refHigh, refLow, refClose) Returns only the stop loss for a short entry on this candle, depending on the ATR
Phát hành các Ghi chú:
v6
Thư viện Pine

Với tinh thần TradingView thực sự, tác giả đã xuất bản mã Pine này như một thư viện mã nguồn mở để các lập trình viên Pine khác từ cộng đồng của chúng tôi có thể sử dụng lại nó. Chúc mừng tác giả! Bạn có thể sử dụng thư viện này một cách riêng tư hoặc trong các ấn phẩm mã nguồn mở khác, 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 chung.

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 thư viện này?

Sao chép văn bản vào khay nhớ tạm và dán nó vào tập lệnh của bạn.