Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Need Help - Would Like to Rotate in and out of TQQQ/SQQQ

Hello,

I'm new to the concept of automated / algo trading. I have 0 experience.

There are basically 2 trading strategies I would like to employ. Could someone please help me determine the simplest way to:

(1) Rotate in and out of TQQQ & SQQQ. Meaning that, buy TQQQ when I tell it to buy (or when there's a MACD cross, but I know this can be more complicated), and then sell TQQQ if it drops 3% and then automatically buy SQQQ, and then sell SQQQ if it drops 3% and then automatically buy TQQQ again ... and so on. (2) Rotate in and out of TQQQ & SQQQ based on MACD crosses. Meaning that, when TQQQ MACD crosses up, buy TQQQ, when it crosses down, sell TQQQ & automatically buy SQQQ. Then, when TQQQ MACD crosses up again, sell SQQQ and buy TQQQ ... and so on.

Any help will be greatly appreciated.

Thank you!