atr_stoploss: Define a stop loss based on the ATR:

Description Usage Arguments

View source: R/stoploss.R

Description

I use the following definition, with default parameters: Stop = Close - ATR(40) * multiple

Usage

1
atr_stoploss(data, ticker, n_days = 40, atr_multiple = 1.5)

Arguments

data

List of price data xts objects

ticker

Ticker

n_days

Number of periods for the moving average

atr_multiple

times I multiply the ATR to substract it from the current close price


martinbel/TradingTools documentation built on June 13, 2021, 4:21 a.m.