PINE LIBRARY
Atualizado ATRStopLossFinder

Library "ATRStopLossFinder"
Average True Range Stop Loss Finder
credits to 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=["RMA", "SMA", "EMA", "WMA"]
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
Average True Range Stop Loss Finder
credits to 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=["RMA", "SMA", "EMA", "WMA"]
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
Notas de Lançamento
v2Added:
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=["RMA", "SMA", "EMA", "WMA"]
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=["RMA", "SMA", "EMA", "WMA"]
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=["RMA", "SMA", "EMA", "WMA"]
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
Notas de Lançamento
v3Added:
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=["RMA", "SMA", "EMA", "WMA"]
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=["RMA", "SMA", "EMA", "WMA"]
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=["RMA", "SMA", "EMA", "WMA"]
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
Notas de Lançamento
v4Added:
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=["RMA", "SMA", "EMA", "WMA"]
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
Notas de Lançamento
v5Added:
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=["RMA", "SMA", "EMA", "WMA"]
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
Notas de Lançamento
v6Biblioteca do Pine
No verdadeiro espirito do TradingView, o autor desse código Pine o publicou como uma biblioteca de código aberto, para que outros programadores Pine da nossa comunidade possam reusa-los. Parabéns ao autor! Você pode usar essa biblioteca privadamente ou em outras publicações de código aberto, mas a reutilização desse código em publicações é regida pelas Regras da Casa.
Aviso legal
As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.
Biblioteca do Pine
No verdadeiro espirito do TradingView, o autor desse código Pine o publicou como uma biblioteca de código aberto, para que outros programadores Pine da nossa comunidade possam reusa-los. Parabéns ao autor! Você pode usar essa biblioteca privadamente ou em outras publicações de código aberto, mas a reutilização desse código em publicações é regida pelas Regras da Casa.
Aviso legal
As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.