Skip to content

Commit

Permalink
try fix #9
Browse files Browse the repository at this point in the history
  • Loading branch information
shikokuchuo committed Aug 18, 2024
1 parent 4168e0a commit c52fcf9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/strat.R
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ strat <- function(x,
s2posn <- c(NA, s2cond[1:(end - 1L)], rep(NA, p2))
s2txn <- c(NA, s2posn[-1L] - s2posn[-xlen])
s2txn[s2posn == 1 & is.na(s2txn)] <- 1
if (s2posn[end] == 1) s2txn[end + 1L] <- -1
if (s2posn[end] == 0) s2txn[end + 1L] <- 1

s1entry <- which(s1txn == 1)
s2exit <- which(s2txn == 1)
Expand Down

0 comments on commit c52fcf9

Please sign in to comment.