Multiple trades taken by rotation strategy
Author: Lieuallen
Creation Date: 11/24/2012 8:47 AM
profile picture

Lieuallen

#1
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!

profile picture

Lieuallen

#2
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?
profile picture

Lieuallen

#3
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!
profile picture

Eugene

#4
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."
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).