Trading With Multiple Tickers

Hi All,

What would the easiest way be to tract multiple Ticker trades?
For example, I am working on an algo, once it works and after testing it in a demo account I want to implement it to multiple tickers.
Easiest would be to run the same app multiple times, but 10+ apps would be too much.

What would the proper programming method/idea be to implement one strategy across several tickers be?

This is a matter of experience. If implementing this in C# or Python, the solution revolves around either opening a dedicated connection for each ticker, or opening a connection for a group of tickers and using a dictionary lookup to redirect the incoming data to the correct orderbook. This is a common interview question when employing people at market making firms, a developer with experience can describe how to code this and can write demo code in an hour or so.

Many ways and fairly simple. You could store the tickers in a file and load into a list to iterate.

for each_ticker in file:
insert your trade strategy hereā€¦

or if you already have these positions, call the list_positions. iterate after putting them into a list


tradedetails = api.list_positions()

for position in tradedetails:
    ticker = position.symbol
    currently = float(position.current_price)
    qty = float(position.qty)
    pllong = float(position.unrealized_plpc)
    pl = round(pllong, 2)
    avglong = float(position.avg_entry_price)
    avg = round(avglong, 2)
    currentlong = float(position.current_price)
    current = round(currentlong, 2)

====================================

these two lines alone, will do the trick imo

tradedetails = api.list_positions()

for position in tradedetails:

Thanks for the feedback. Think opening a dedicated connection to each ticker would be more appropriate to my needs.

The next step will be if I open multiple positions on a ticket, how to accurately track them.
But I should be able to handle this