Skip to content

Best way to handle max open trades on a trading system #788

Answered by cjdsellers
gaugau3000 asked this question in Q&A
Discussion options

You must be logged in to vote

It helps to consider the event driven nature of the platform. For live trading there will be a delay between submitting orders and events based on that coming back into the system.

Even for backtesting the SimulatedExchange simulates the processing of trading messages.

And so I would carefully consider your strategy logic, and leverage the on_event method to take actions based on event triggers, with no assumptions as to the state the cache may be in after executing commands, if that makes sense?

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by cjdsellers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
2 participants