I have created a composite called Nasdaq 52 week highs minus 52 lows (symbol is _NASDAQ_52WK_His_LOs). I want to use this composite using the MM script to optimize for buy-sell rules as follows:
Buy SPY when composite >a
Sell Spy when composite <b
So I would be optimizing for "a" and "b".
Thanks, this works. I tried to add a second rule to buy and sell so that in addition to the composite condition, I must satisfy an sma condition, but I get errors. Here is what I did.
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.