.indicator .signal should not evaluate the $.call slot when the object is being merely defined.
Result being $data slot filled with data
See for example this snippet:
`%AND%.signal` <- function(x, y) {
op <- as.name(.Generic)
.call <- substitute(op(x, y))
X <- calc.signal(x, name="Signal.x")$data
Y <- calc.signal(y, name="Signal.y")$data
Z <- unique(setkey(rbind(X[Y, roll = T, rollends=FALSE],
Y[X, roll = T, rollends=FALSE],
use.names = TRUE),
Instrument, Date)
)[,Signal := as.logical(Signal.x * Signal.y)]
Z <- Z[, list(Instrument, Date, Signal)]
return(signal(call = .call, data=Z))
}
.indicator .signal should not evaluate the $.call slot when the object is being merely defined. Result being $data slot filled with data See for example this snippet: