quantstrat
On 01/10/2011 11:19 PM, Stephen Choularton wrote:
I had a look at the bbands demo and it appeared to go long and short and specified NULL as the ordertype rather than long or short. That got rid of my warning that I was going short, but it didn't produce any short trades.
I've modified your broken code. Updated R code and PDF attached. It goes short, as expected. The P&L is awful, also as expected. Please take more time to debug your code in the future. - Brian
Brian G. Peterson http://braverock.com/brian/ Ph: 773-459-4973 IM: bgpbraverock -------------- next part -------------- A non-text attachment was scrubbed... Name: SC.bbands.pdf Type: application/pdf Size: 217686 bytes Desc: not available URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20110111/f379952d/attachment.pdf> -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: SC.bbands.R URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20110111/f379952d/attachment.pl>