get_strategy_sma: Get strategy SMA

Description Usage Arguments Details

View source: R/get_strategy.R

Description

Get strategy SMA

Usage

1
get_strategy_sma(data, eps_buy = 1, eps_sell = 1)

Arguments

data

stock data

eps_buy

numeric value specifying how much larger SMA should be than close stock price before event is triggered. 'eps' = 1 corresponds to buy condition of SMA > Close

eps_sell

numeric valuing specifying when to sell in percentage deviation

Details

'eps' = 1.02 means SMA should be 2 the strategy indicates a buy. Similarly 'eps' = 1.02 means SMA should be 2 than the closing price before selling. Larger values of 'eps' leads to fewer buy/sell signals. If inputs are selected such that no buy signals is obtained, an error meesage is returned.


kristian-bak/kb.stock.simulator documentation built on Dec. 21, 2021, 7:46 a.m.