I'm working on my first WealthScript code, and I'm having a devil of a time! I thought all my trading logic was correct, but when it executes, the trades duplicate -- I have 6 symbols in my dataset, and all the trades are duplicated 6 times.
And, when I use a piece of code from the QuickRef, the same thing happens! So, perhaps it's not my fault?!
I'm currently testing the code example given for DataSetSymbols:
CODE:
Please log in to see this code.
For my dataset, there are 6 symbols. The BuyAtMarket command is executed
6 times for each bar (entry and exit dates are identical). Any ideas why?? Seems like "s" isn't incrementing until all symbols have been evaluated, but I can't figure out why.
Thanks!
Size:
Color:
Just more fuel for the fire:
I have also tried the RSIRotation strategy (which is the one I'm trying to modify), and it also executes all trades 6 times. Can anyone else confirm this?
Size:
Color:
How embarassing! The problem was that I was clicking the name of my dataset, rather than one of the symbols. So, I was running a strategy that evaluates the whole data set in Multi Symbol Backtest mode -- hence the duplication.
Thanks for listening!
Size:
Color:
Hint: to avoid typical mistakes, it pays off to read the FAQs (or at least the RSI Rotation strategy's description):
FAQ | Strategies and WealthScript > Rotation strategies > "
A Rotation strategy isn't working like it should."
Size:
Color: