High-Frequency-Trading-Model-with-IB icon indicating copy to clipboard operation
High-Frequency-Trading-Model-with-IB copied to clipboard

Running multiple pairs using the same single model

Open developeralgo8888 opened this issue 4 years ago • 0 comments

Under main.py is there a way to run multiple pairs at once using the same hftmodel1

below will only run ( EURUSD , USDJPY ). if for example let's say i want to run 3 pairs

(EURUSD, USDJPY ) , (AUDUSD, USDCAD) , (GBPUSD , USDCHF )

how would i implement that in the main .py

model = HftModel1(
		host=TWS_HOST,
		port=TWS_PORT,
		client_id=2,
	)

	to_trade = [
		('EURUSD', Forex('EURUSD')),
		('USDJPY', Forex('USDJPY'))
	]

	model.run(to_trade=to_trade, trade_qty=100000)

developeralgo8888 avatar Apr 29 '21 13:04 developeralgo8888