In the last post I may have given the impression that RandomBotMgr computes
the trade times, then hands them off to RandomBot for scheduling.
What happens is that RandomBotMgr decides if the exchange is open and, if so,
connects to TWS, creates a RandomBot, providing it with the 'open', which is
"now," and 'close' times. RandomBot then computes an entry and exit time,
constrained by the 'open' and 'close' times, then schedules the trades.
But if RandomBotMgr were to find each pair of times to trade, and if it
then ran a RandomBot thread to handle the entry order, then ran a RandomBot
thread to handle the exit order, RandomBotMgr might be in a better position to
manage the trades. There is a lot to be considered about the relationship
between RandomBot and RandomBotMgr.
by the way, RandomBot is essentially what is in randTime.java's
'Bot' class, so it is finding the entry and exit times for each
random trade (round-trip).
the trade times, then hands them off to RandomBot for scheduling.
What happens is that RandomBotMgr decides if the exchange is open and, if so,
connects to TWS, creates a RandomBot, providing it with the 'open', which is
"now," and 'close' times. RandomBot then computes an entry and exit time,
constrained by the 'open' and 'close' times, then schedules the trades.
But if RandomBotMgr were to find each pair of times to trade, and if it
then ran a RandomBot thread to handle the entry order, then ran a RandomBot
thread to handle the exit order, RandomBotMgr might be in a better position to
manage the trades. There is a lot to be considered about the relationship
between RandomBot and RandomBotMgr.
by the way, RandomBot is essentially what is in randTime.java's
'Bot' class, so it is finding the entry and exit times for each
random trade (round-trip).