?
你的需求表述總結
1,在沒有倉位時,并且CondA成立則開倉,若cond2 滿足則加倉2手。
2.condB滿足就開倉2手。
如果上述理解沒有問題就是
if condA and HOLDING=0 then buy();if cond2 then buy();
if condB? then buy();