Search results

  1. D

    Trading bot construction (IB)

    chameleontrader: thanks for the link. I looked through the code and will download and try it. Some interesting things were in places like chart, strategy, virtual tws -- a great idea -- Trader.java and TradingSchedule.java. It may be that random trading could be plugged into it as a...
  2. D

    Trading bot construction (IB)

    re: "After thinking some more about extending Random, it occurred to me that an extension of Random, in order to fit with what Random offers, should offer a nextRandomTime method, but the bot doesn't need that functionality." Yet it could be done with such a method: the bot would need to...
  3. D

    Trading bot construction (IB)

    After some more testing, I found that a trade at the very start of trading hours, 09:30:00 for example, can't be generated. The fix is: RandomTime(RandomTime open, RandomTime close) { calls++; while (true) { hours = nextInt(close.hours)...
  4. D

    IB API Multiple Order Issue.

    If you play around with TestJavaClient, I think you'll see that tws does send back something when an order is submitted. It sends a message to the software running via the API. If I remember correctly, it sends status for a valid order and an error message for an invalid order. Of course...
  5. D

    IB API Multiple Order Issue.

    Even if tws doesn't queue the orders, there may be enough buffer space in its network layer to hold the incoming order messages until tws gets around to processing them. Are you sure the orders were sent? Did each order have a different id? Did tws send any messages back to you? Then...
  6. D

    IB API Multiple Order Issue.

    I don't know whether tws accepts multiple outstanding requests. If it can't, you'd have to queue the requests, sending the next after you got back some status/confirmation concerning the previous. Because tws was designed for humans, who cannot enter orders faster than tws can process...
  7. D

    Trading bot construction (IB)

    retrying the attachment ... It made it, and reading it, I realized that the assertions about the 'hours', 'minutes' and 'seconds' of 'open' and 'close' should occur before RandomTime(open, close) is ever called. edit: the assertions are OK where they are, too
  8. D

    Trading bot construction (IB)

    For some testing, I've been using randTime.java, which I've attached as randTime.txt. With it, you can see where I'm headed with a change to RandomTime.java, RandomBot.java and Main.java. After thinking some more about extending Random, it occurred to me that an extension of Random, in...
  9. D

    Trading bot construction (IB)

    I have made RandomTIme an extension of Random -- not yet finished testing. It seemed that a lot of time was spent somewhere, if the exchange hours were shortened. The problem was here: // is the exit time later than the entry time? while...
  10. D

    Trading bot construction (IB)

    Here are some more issues with RandomBot: 1. The 'client' code throws exceptions. Which exceptions are thrown? What is their impact on the bot? How can they be handled gracefully? 2. Is every exception that the bot can cause handled gracefully? 3. How robust is the bot in the face of...
  11. D

    Trading bot construction (IB)

    here is RandomBot.java -- inside RandomBot.txt. Also, these need 'Wrapper.java', attached earlier. To build: javac Wrapper.java javac RandomTime.java javac RandomBot.java javac Main.java to run: java Main
  12. D

    Trading bot construction (IB)

    here is RandomTime.java -- in RandomTime.txt
  13. D

    Trading bot construction (IB)

    The random bot is starting to work. There are four files: Wrapper.java, RandomTime.java, RandomBot.java, and Main.java. These, too, wherever you put them, depend on having a 'client' subdirectory. And all the '.java' files in the 'client' subdirectory should be part of package client, not...
  14. D

    Trading bot construction (IB)

    retrying the attachement ... I forgot to mention, all the '.java' files in the 'client' subdirectory need to be part of package client instead of package com.ib.client
  15. D

    Trading bot construction (IB)

    chameleontrader: I agree that it isn't easy to post code here -- later in this post, I'll try attaching a Java file as a '.txt' file. I'll look into CCAPI. What error do you get? I expect that exception handler to run when the client has died. It should run because the client has died and the...
  16. D

    Trading bot construction (IB)

    Here are some interesting questions about testing a bot: 1. Could historical data be converted into tws->api messages? If so, what historical data is necessary? 2. How do the tws->api messages convey information like last price, bid price, ask price, last size, bid size, ask size...
  17. D

    $500 intra day margins - reasons

    Maybe $500 margin lets a trader trade more contracts, which gets the broker more commissions.
  18. D

    Trading bot construction (IB)

    At some point we have to consider the implications of what we contemplate. I have realized that I am contemplating distributing tws -- I don't mean distributing the program, but the services it provides via the api. I am a victim of the design-for-extensibility mindset (it is a way of...
  19. D

    Trading bot construction (IB)

    Raul: Thanks. I went to see the Ruby project, but could only see snippets of code. I'll have to get an svn client running, I guess. I have added a directory, 'tools', at the same level that 'client' and 'server' are on, under 'ATS'. I have placed 'test1.java' there and this, too: /*...
  20. D

    Trading ES in a prop firm?

    Hi, Maverick What do you consider mean reversion on ES to be at this time? I know recently that it has been trading in a 3 year long up trending channel, and, more recently, in a channel that began about 6 months ago, and, even more recently, somewhat of a flat channel (?). Would a good...
Back
Top