Hi everyone,

Great to see a vibrant community here. I am trying to learn how to code using examples posted, so please bear with me. I tried to modify a Sector Rotation Routine posted in one of the discussions to add a EMA filter but couldn't do it. Basically, if the top asset is greater than its 200 day EMA, only then we will buy it, otherwise we will go with the safe harbor. I am attaching the code here. I hope someone can help.

Thank you in advance,

Maji

Author