Thanks for the information, Eugene.
QUOTE:
Without a time machine or a good crystal ball, you can not build a series based on the daily close and sell at open this day.
I am aware of this limitation, but this was discussed in another post about this same strategy. Actually, the strategy is to enter a limit order to sell upon the price crossing the upper band. Since I cannot backtest that strategy as such, I decided to sell at the open of the day in which the price later crosses the upper band would be a better estimate than to sell at the open at bar+1, in which case the price could gap higher or lower at the open. Since the opening price on that day will
always be lower than the limit price which will be reached later that day, I felt that, while the strategy is impractical as written, since I cannot set a limit price in backtesting as I would in a live trade, this would be the closest and most conservative work-around for that limitation. Let me know if I am totally missing something in that assumption.
QUOTE:
Notice what was changed in your strategy to account for the EMA's instability.
I'll have to look at the EMA stability. As I understand it, an EMA has to have a sufficient amount of back data, in this case, about 150 days' data, in order to make the EMA meaningful. This may necesitate my creating a future post for clarification.
Also, thanks for your explanation regarding the RiskStopLevel. Since I have had little programming experience, and no experience with an object-based language, getting the syntax right has been a matter of typing the code into the program and trying to understand the language while doing so.
-Rick