How do i specify in the Strategy script to buy TLT upon Bear market signal and sell upon Bull signals?
My trading system is a simple market timer with 1 symbol (SPY) as follows -
- You need to create a long/short trading system
- Create the "short" and "cover" variables (like the buy/sell)
- Use "stringequal" function to know which symbol is analyzed
The logic is Buy TLT (not Short) during Bear markets. I tried the following simple system (with symbols SPY and TLT) but it holds SPY throughout - doesn't execute the Buy/Sell. Is there something wrong in having 2 Buy statements in the same script?
What could be the issue?
Trading financial instruments, including foreign exchange on margin, carries a high level of risk and is not suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to invest in financial instruments or foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with trading and seek advice from an independent financial advisor if you have any doubts.