(sigh) I can see another glitch from the cut and paste of the doc, which I will change. For example, there is certainly no SetStop timer action in the code to match the doc, so the cut-and-pasted doc must be changed.
I can't speak to exactness, but it seems to me that Altucher worked with daily strategies, not intraday strategies (which is what the (now incorrect) doc from the QD product was talking about). So that's one big difference.
Another is that even if you have a profit target of 1%, it's just a target that issues an exit order when 1% is reached. The actual trade price might be more or less than 1%.
I don't have Altucher's book in front of me, so I can't even comment on whether the code that we're looking at is supposed to come from Altucher's book.
The way things work is that the strategy code is always orginally written by the SQ guys. Then I try to figure out what they're doing, and then try to tidy up and document the code so that people have a better chance of understanding the algorithm.
I know that the original code strategies from a year or two ago were modelled somewhat after his book, but it looks to me like the code changed along the way somewhere from my original doc to the current code, which is why the cut-and-paste from QD to OQ doc is not right (I missed the change.)
The code you're looking at is for 5-minute bars, for sure. Here's what my copy of the entire doc says for this strategy:
Quote:
4.7.2 Bollinger Bands with 5-Minute Bars
This Bollinger band strategy is intended for short intraday trades that last no longer than 5 or 10 minutes. It enters a trade if prices fall 3% below the lower Bollinger band, and exits a trade when a 1% profit target has been reached, or when two bars have passed since the trade was entered.
I hope this helps. It's good that you're trying to understand the details of the code and how the algorithm is supposed to work (vs how it actually works). Because we all know that the devil is in the details in computerized trading.[/quote]