Rotation Strategy based on a ratio of two stocks
Author: changhengyiu
Creation Date: 9/6/2015 12:04 PM
profile picture

changhengyiu

#1
I am trying to test Rotation Strategy base on a ratio of two stocks but never succeed. Could you tell me what parts are not correct?? I put three sets symbols in it for example. There will be more sets in it actually.
CODE:
Please log in to see this code.
profile picture

Eugene

#2
How about this?

CODE:
Please log in to see this code.
profile picture

changhengyiu

#3
Eugene,thanks a lot. There shows a error message when i run it. I show it with a picture. Could you take a look?
profile picture

Eugene

#4
Please either run not on All Data (select "Most recent" or "Fixed bars") or change this line:

CODE:
Please log in to see this code.
profile picture

changhengyiu

#5
Thank you, It works well!
profile picture

changhengyiu

#6
Hi Eugene
I found that "Min.holding time" doesn't have function here. Could you take a took?
profile picture

Eugene

#7
It is purposefully disabled due to a bug:

ActiveTrader 2012-05 | Efficient Rotation strategy

See posts #31 (problem) and #33 (solution).