Skip to content
Back to formatted view

Raw Message

Message-ID: <4D2C52D6.4060301@braverock.com>
Date: 2011-01-11T12:53:42Z
From: Brian G. Peterson
Subject: quantstrat
In-Reply-To: <4D2BE853.3020803@organicfoodmarkets.com.au>

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>