Dear All, I am trying to replicate core strategy (for a single instrument) from the book 'Following the trend' by Andreas Clenow. Details about the strategy are in the picture in this link (*https://drive.google.com/file/d/0B5GQskyO5V5SVU1SdTFhY2txWEk/view?usp=sharing <https://drive.google.com/file/d/0B5GQskyO5V5SVU1SdTFhY2txWEk/view?usp=sharing>*). I was able to add entry indicators, signals & rules, but need help with the exit part (6th & 7th bullet points in the picture). Also, I am not able to update the portfolio, hence cannot plot performance charts. I would be very grateful for your help if you could look into the code attached and help me resolve this issue.
Best , *Adarsh KP* Research Associate in Finance, Indian School of Business (ISB), Hyderabad, India. +91-9126140440 <https://www.linkedin.com/profile/view?id=204329912&trk=nav_responsive_tab_profile> ? -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20161212/d4d0d5d4/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: Query.R Type: application/octet-stream Size: 7096 bytes Desc: not available URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20161212/d4d0d5d4/attachment.obj>