Now another question, I would like to make something like this:
buy = iff(stringequal(name(), "SymbolNameXXX") and rank1 == 1 and level1 == 1, 1, 0);
buy = iff(stringequal(name(), "SymbolNameYYY") and rank1 == 1 and level1 == 1, 1, 0);
Could this work?
It buys the second and stays out when the conditions are not met (which is how I want it) but also stays out when condition of SymbolNameXXX is good.
Trying to compare 2 stock, then compare the roc 6 month of first in rank with tax rate, if it's bigger buy stock in rank 1, else buy bonds.
Although this kind of works, in the results at least, it doesn't work like I was expecting! I also made a screener with same rules to compare and I can see that it's not always buying stock in rank 1 don't know why...
Also don't know how to exit position if currently holding Bonds, unless I rebalance every month, which I would not want unless market conditions change.
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.