Exponential moving average standard devation

apply_pt_sl_on_t1(price, events, pt_sl = c(1, 1))

Arguments

price

xts or data.table with index and price columns

events

Indices that signify "events" (e.g. CUSUM events)

pt_sl

Element 0, indicates the profit taking level; Element 1 is stop loss level

Value

data.table; timestamps of when first barrier was touched