I like to trade leveraged ETF pairs. For example, UWT and DWT. They are inversely related, so when one goes up, the other goes down and vice versa.
I have separate systems for both of those ETF. Each system generates both LONG and SHORT signals. But I don’t like to sell short anything
When DWT generates a SHORT signal, I would actually like to go LONG UWT. When UWT generates a SHORT signal, I would like to actually go LONG DWT. I would also take all LONG signals generated by each system.
My question is, how would I code something that merges the 2 systems, takes all LONG signals generated by each system, and also uses each system’s SHORT signal to take a LONG position in the opposite ETF?
Thank you in advance for any guidance that you may be able to provide me.