How to get Bid/Ask information on two different Assets? (OnBookEvent)

 

Hey there,

I have a algorithm that I need to get information from the Bid/Ask book from two different stocks to trade them.

The issue is, that I can run that algo in the function OnInit(), which requires me to keep replaying the EA.

I would like to use the function OnBookEvent(), but when I try to use it, it result on a error since I'm trying to get information on two different stocks.

Does someone know how can I make this algo to run automatic throughout the trading hours?

Thank you!