Hello QC Community!

I have been struggling with getting the core framework for a long/short portfolio established.  My objective is to hold long a balanced portfolio that will shift up and down risk based on broad market technical data.  The short portfolio is something new to me and I am just beginning to explore these strategies.

In the attached strategy I was hoping to accomplish the following:

1)      Simple Risk/De-risk on the Long portfolio

2)      Short positions where RSI > 80 and the EveningDojiStar pattern exists

I am running into the following issues.

-          Warmup function for RSI in Coarse filter not working

-          SPY and TLT are being included in the short portion of the portfolio and are liquidated in the OnData function

-          How do I filter out all of the leveraged VIX products that are shorted?

-          I don’t even know where to begin to get the Evening Doji Star calculated or what it’s output is.  Didn’t see much in the documentation about using the Candlesticks Patterns.


Any thoughts would be greatly appreciated!