Eugene;
I insterted the above code lines where indicated (I think), and the result is below.
I am getting bizarre results.
For example using the following parameters:
Scale: Daily
DataRange: 5-Yrs
PosSize: Portfolio Simulator: Percent of Equity = 20%; Margin Factor = 2:1
DataSet: Source=Fidelity: XLB, XLE, XLF, XLI, XLK, XLP, XLU, XLV, XLY
and FSLXX (my Fidelity cash account)
n Symbols: 5 (default)
ROC Period: 14 (default)
Keep > Days: 5 (default)
1. This morning I get 10 Alerts, but all 10 are the same symbol (Buy XLE).
2. If I view Trades, I notice that it shows symbols have traded multiple times on the same dates.
3. If I view Equity Curve, it shows the Cash symbol on the same dates as the Equity symbol, and shows the Cash value to have drawn down to almost 100% below zero.
4. When I first tried the code, I remember seeing a chart showing SPY price and SMA=100, but no longer can find it.
Can you help?
When we started this thread, it was suggested to modify the existing Rotation Strategy code rather than coding from scratch, but would it be better to start from scratch?
CODE:
Please log in to see this code.