[R-SIG-Finance] Cant get this Quantstrat going,

Brian G. Peterson brian at braverock.com
Sat May 5 12:51:22 CEST 2012


On Sat, 2012-05-05 at 03:37 -0700, gussinsky wrote:
> I also would like to point out, that the calculation of the CCI is
> wrong,all through the mktdata it is either -66.66 or 66.66. Having
> performed a manual calculation of the CCI with the underlying data
> from tblox, worked just fine. 

Well then, your CCI function is broken.  

Fix that *first* and apply it to your market data before trying to
insert the indicator it into a strategy.

All that applyIndicators (as called by applyStrategy) does is call your
indicator function and pass it your market data.  You can and should
test your indicator function outside of quantstrat to make sur ethat you
can apply it to market data before trying to incorporate it  into a
strategy.

-- 
Brian G. Peterson
http://braverock.com/brian/
Ph: 773-459-4973
IM: bgpbraverock



More information about the R-SIG-Finance mailing list