Search results

  1. D

    Trading bot construction (IB)

    I see that it is possible to 'setServerLogLevel()' and that there are some things in EClientSocket that might be useful in finding out about what happened to an order. Here is the disconnect method public void disconnect() { try {...
  2. D

    Trading bot construction (IB)

    re: Today's disaster The bot wasn't subscribed to market data. TWS may have choked on the high volume. I now wish that after I quit TWS I had restarted it to see if the ES data started flowing. QM was updating while the ES data was missing. A more "normal" bot would be subscribed to...
  3. D

    Trading bot construction (IB)

    This is an interesting log (today): 09:07:23 logger time zone is set to America/Chicago 09:07:23 connecting to TWS on localhost at port 7496 with id 0 Server Version:31 TWS Time at connection:20070215 08:07:15 GMT-07:00 09:07:23 TWS: (id=-1, code=2104) Market data farm connection is...
  4. D

    Trading bot construction (IB)

    This may be a way to implement risk management, if there is a range-breakout bot available: 1. Run a bot 2. If the bot enters a position, run a range-breakout bot, which would place an order in the opposite direction of the step-1 bot if either side of the range were hit. What sort...
  5. D

    Trading bot construction (IB)

    Thinking about adding a GUI to make the bot more configurable, thinking that the GUI might be a Java program that would run the bot (a separate Java program) when the user clicked a 'run' button, after doing whatever configuration was necessary. Keeping the bot and GUI separate helps keep...
  6. D

    Does the YM lead the ES?

    There is something about "causal thinking," set down several hundred years ago, which basically states: If event 'a' preceeds event 'b', it is not necessarily true that 'a' caused 'b'.
  7. D

    Trading bot construction (IB)

    A usability issue has surfaced: if the bot is run every day with java RandomBot/Main >> log so that each day's log is appended to what was logged on previous days, then there is no indication of the day on which events in the log occurred. A workaround could be to run the bot from a...
  8. D

    IQFeed data vs other data providers

    If the app. you're running wasn't written as a multi-threaded app., then multiple cores may not help. The vendor should modernize its software.
  9. D

    Trading bot construction (IB)

    That bug is in RandomTime.java, not RandomBotMgr.java. It's about line 53. Today, the bot bought at 13:27:32 and sold at 14:35:09, Chicago time, for a loss of 0.5 pt. If it had waited a little longer before selling ... When TWS was in the toolbar, order confirmation took more than 7...
  10. D

    Trading bot construction (IB)

    A review of the code revealed a bug: // Does the time satisy the constraints? if ( (isLaterThan(t, t0) || coincidesWith(t, t1)) && (isEarlierThan(t, t1) || coincidesWith(t, t1)) ) break; else continue; That's in RandomBotMgr. There is a 't1' where there...
  11. D

    Trading bot construction (IB)

    Isn't Java wonderful? interface Y { public boolean eventHappened(); } class TimeOut { boolean timeout(Y c) { if (c.eventHappened()) return true; else return false; } } class A implements Y { public boolean eventHappened() { return true; } A()...
  12. D

    Does the YM lead the ES?

    YM leads ES when it does; at other times, it doesn't. If only we could know whether YM is leading ES right now.
  13. D

    Trading bot construction (IB)

    A bot has to implement the 'nextValidId' method. One of the first things that TWS does when something connects via the API is send a next-valid-order-number, and when that is received EReader will call 'nextValidId', supplying the number as an argument. Without that number, the bot couldn't...
  14. D

    Trading bot construction (IB)

    The bot made 0.75 pt. today. It sold at 12:53:41 and bought at 13:38:43. Initially, it looked like a bad time to sell.
  15. D

    Trading bot construction (IB)

    Here's hoping that google's mind is enriched (shameless promotion): random time generator random trading random time program trading IB API random trading bot java random time algorithmic trading Come on, Goldman Sachs, don't you need a random-trading consultant? Rev. 1 of the...
  16. D

    Trading bot construction (IB)

    A couple of posts back, there's a '.zip' file containing a random-trading bot that works with IB's API. Beside the README and LICENSE files there are nine, count 'em nine, '.java' files there -- some of it very interesting: Return.java supports a 'Callable's return object; TimeOut.java...
  17. D

    ib globex order

    It can probably be done with a "stop" order. If you're long and want out when the price drops to a certain point, you would do a "sell stop" order. With IB, you have to make sure that your "outside of regular trading" hours is set in the configuration. The market isn't open 24/7, so if...
  18. D

    Trading bot construction (IB)

    Whoops! There are some changes to the README: Running without any command line arguments is like typing: java atbot/Main 0 7496 localhost should read: Running without any command line arguments is like typing: java RandomBot/Main 0 7496 localhost Another line...
  19. D

    Trading bot construction (IB)

    I've attached a '.zip' file that contains the code for a random-trading bot. I haven't learned everything about Java, so if you're a Java pro, you may get some laughs. There is a README file and a LICENSE file. I may, occasionally, fix a bug or implement more of the interface between TWS...
  20. D

    Trading bot construction (IB)

    Suppose the bot enconters an exception other than the disconnect exception and one that wasn't deliberately generated by the bot. At that point, should the bot be trusted to continue? If such an exception is encountered, should the bot just try to notify a human then quit? Should the bot be...
Back
Top