CumUp.Series
Author: gbullr
Creation Date: 10/19/2010 9:57 PM
profile picture

gbullr

#1
Doing something wrong.

Trying to identify places where stock lows have been up three days in a row. Clearly I am not doing something right b/c in the S&P 500 there is not one instance.
CODE:
Please log in to see this code.



profile picture

Eugene

#2
There's no problem with the code (although I'd change the equality sign to "greater or equal" i.e. CumUp.Series(Low,1)[bar] >= 3).

What are the selected position sizing settings? Have you reviewed the Symbol Info Manager and/or Commissions/Backtest/Slippage tabs in Preferences?

Another straightforward way to troubleshoot is to add a call to AnnotateBar or PrintDebug on the bar of entry.
profile picture

Cone

#3
Note that Close[bar] > 10 is a peeking condition for stocks that have split. For a price > X backtest condition, you need to use a reverse-split adjusted series. The Strategy Builder can help you with that - check the "Price (or Volume) Action" category, Price is above a value (backtest)
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).