Remove extra signals with exrem

buy=exrem(buy,sell);
sell=exrem(sell,buy);
it picks first signal, however, if I want the second signal, what can I do?

not tested

Sell=ExRem(Sell, Buy);
BuyOrd = SumSince(Sell, Buy);
Buy=BuyOrd == 2;
Buy=ExRem(Buy, Sell);
Sell=ExRem(Sell, Buy);

1 Like

< preceding post quote removed >

Thank for your help @awilson. if BuyOrd==2 it will work, otherwise it will not work.
BuyOrd could be 3 or more, then it will not work.

I am using version5.7, there is no “SumSince”, so, I am not able to test.

Moderator comment: instead of quoting the previous post just use @ to refer to given person reply. Quoting makes no sense because the message (properly formatted code) is already there just before your post. Also: minimum supported version is 6.0 as per forum rules