[R-SIG-Finance] Need help getting stop-loss and take-profit orders to work with indicators
Mark Knecht
markknecht at gmail.com
Wed Aug 6 16:10:56 CEST 2014
On Tue, Aug 5, 2014 at 3:47 PM, Ilya Kipnis <ilya.kipnis at gmail.com> wrote:
> Mark,
>
> Thanks for getting back to me. Since I'm using gmail, I didn't have any line
> wraps. However, I'm attaching my demo as an R file. Fixed the little typo.
>
> Thanks so much.
>
> -Ilya
>
When using gmail ensure you have 'plain text' selected. (bottom right usually)
When I run this code I see this as the first failure:
[1] "Hammer_4TP"
>
> #apply strategy
> t1 <- Sys.time()
> out <- applyStrategy(strategy=strategy.st,portfolios=portfolio.st)
Error in `colnames<-`(`*tmp*`, value = c("XLB.Close.SMA.30",
"XLB.Close.SMA.10.sma1.SMA.30" :
length of 'dimnames' [2] not equal to array extent
> t2 <- Sys.time()
> print(t2-t1)
Time difference of 0.06236649 secs
>
Is that the problem you are trying to solve?
Generally it's good to be really clear about what you're asking for.
Show the code run, copy error messages, etc.
- Mark
More information about the R-SIG-Finance
mailing list