Trying to exclude Spinning Tops

I am running my algorithm, trying to find candles of particular design (See If statement). On one particular day (2016-01-08), I find 2 of those candles (see Logs). However, 1 one of them (at 10:10am) is a Spinning Top. Not what I want. How do I know this one is a Spinning Top?. I set up a different algorithm, looking for Spinning Tops, and this one comes up as in the search. However, I can't figure out how to program to do the opposite: exclude Spinning Tops. I need something like this:

priorBar[1] != Spinning Top

 I have tried many different approaches without success. Thanks in advance

Update Backtest

I found solution to the above problem. I added the following code:

private SpinningTop spinTop = new SpinningTop();
spinTop = CandlestickPatterns.SpinningTop(_symbol);
if (spinTop != 0) return;

With that, instead of original 2 candles, now only 1 was found, excluding Spinning Top, just as I wanted. 

See updated algorithm:


Update Backtest


The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


This discussion is closed