DON'T TRADE SYMBOLS FROM THE SAME GROUP (for instance, belonging to a watch list) AT THE SAME TIME

HI!

I have a doubt about how a I could do the next code:

I have three watch lists (list 1, list 2 and list 3)
List 3 has the symbols from list 1 and list 2.
I am going to run the system code for the list 3
Just two simultaneous positions
I don’t want to trade symbols from the same list. I mean (trade one symbol from list 1 and one from the list 2, so If there is a trade with a symbol from list 1, I don’t want that the next trade take a symbol from this list, despite of having a signal to get into the market).

Any suggestion?

Thank you very much!!

This can be done either using static variables (so you keep track of which WL is currently active and prevent signals on “other” WL), or using custom backtester.

I am not very good programer but I have coded almost everything I wanted just testing or coping examples and adapting to my needs; so could you give me a simple example, please?