Announcement

Collapse
No announcement yet.

Determine Order Fill

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Determine Order Fill

    I've read the help items on using EFS to send broker trades, but it isn't clear to me how to determine programmatically if a trade (such as a limit order) was filled and when it was filled.. Could someone point me to a document that discusses this issue?

    Thanks.

  • #2
    Hi AH,

    Try searching with fill AND limit* AND order

    Also try searching fill AND limit and add Jason's user name JasonK.


    This is a good post I found using the second search criteria...



    When using the search tool, I find that using the AND conditional in addition to wildcards * at the beginning and end of the search terms can really focus the Search results down nicely.

    If you should find ones that help you out, please post the ones you found most helpful. You can post a link directly to the post in this format ...


    Code:
    http://forum.esignalcentral.com/showthread.php?s=&postid=85199#
    ... ensuring the specific post ID is at the end. You can identify the particular post ID by hovering your mouse over the quote button in the post and the specific ID number will show up in the status bar in your browser.

    Comment


    • #3
      I tried several searches but didn't come up with anything definitive yet. There were some comments from eSignal folks saying that they do not get information from brokers and store it in the database. But, I did run across some Jason wrote called BROKERINFODISPLAY[1].efs.

      I have to spend some more time with this to understand what's going on, but there's some promise. The immediate problem seems to be that all trades with a broker may be able to be retrieved, but associating each one with a specific order sent by a script -- especially if multiple scripts are running -- is more of a problem. I left a message in the trading strategies forum. There must be an easier way if someone is writing automated trading scripts.

      ------
      Originally posted by stevehare2003
      Hi AH,

      Try searching with fill AND limit* AND order

      Also try searching fill AND limit and add Jason's user name JasonK.


      This is a good post I found using the second search criteria...



      When using the search tool, I find that using the AND conditional in addition to wildcards * at the beginning and end of the search terms can really focus the Search results down nicely.

      If you should find ones that help you out, please post the ones you found most helpful. You can post a link directly to the post in this format ...


      Code:
      http://forum.esignalcentral.com/showthread.php?s=&postid=85199#
      ... ensuring the specific post ID is at the end. You can identify the particular post ID by hovering your mouse over the quote button in the post and the specific ID number will show up in the status bar in your browser.

      Comment


      • #4
        AH,

        I did notice your other post. There is nothing that I am aware of that provides feedback that indicates a broker has filled a trade.

        Originally posted by AssetHound
        I tried several searches but didn't come up with anything definitive yet. There were some comments from eSignal folks saying that they do not get information from brokers and store it in the database. But, I did run across some Jason wrote called BROKERINFODISPLAY[1].efs.

        I have to spend some more time with this to understand what's going on, but there's some promise. The immediate problem seems to be that all trades with a broker may be able to be retrieved, but associating each one with a specific order sent by a script -- especially if multiple scripts are running -- is more of a problem. I left a message in the trading strategies forum. There must be an easier way if someone is writing automated trading scripts.

        ------
        This excerpt was from the link I posted...

        In general, you will record the price level where you want the entry to occur based on your green bar signal using a global variable. Then you will add a condition inside main() that will look for the next bar that breaches that price level that will in turn execute the Strategy.doLong(Description, Fill Type, Fill Bar, LotSize, StopOrLimit) call at your specified price level when that breach occurs.

        I felt this was the answer to your question. This is how I have always done it for purposes of simulating fills. You have to keep track of the price going past, or "breeching" your limit price. If it does not breech the price level, it is not likely that your order is filled since there are usually many orders in front of yours that get filled. If the price breaches your order price, you know that all the orders at your price level have been filled and there is very high confidence that yours was or would have been as well.


        However, if I understand what you are trying to do, you are talking about confirming actual trades in an automated manner. My personal risk tolerance dictates that this is not sufficient if you are trading live. IMHO, you need some positive confirmation that a trade has been entered/closed. I know there has been improvements in this area, but for purposes of automated trading, I am not sure if you will get that with the broker functions within eSignal. There have been companion products that have filled this gap in the past, dynaOrder comes to mind since I had used this add-in. However, that company went under and there is no support for the interface. Another eSignal Partner is NinjaTrader, they provide an interface that provides the type of direct feedback I believe you are after. (There may be others as well, but I am not familiar with them.)

        My recommendation is to develop your system by confirming the trades by using price action, ensuring you develop the logic modularly within different functions such that you can easily substitute another trade confirmation mechanism. When you get to the point of actually trading, look into this again. At that time, this functionality may be available through eSignal. If not, you can go use NinjaTrader or similar interface. Regardless, you would have already completed the hard part of developing the logic in your code and it will be relatively simple to make the changes you need.

        I hope this helps.

        Comment


        • #5
          Steve,

          I understand the risk issue. I have some systems that I've developed and backtested as well as tested manually on an ongoing basis. They don't trade that often, so I have time to exit if something isn't working -- with little downside risk (which is managed by some strict money management rules). As more volume is tied up in automated trades, I actually like the fact that the script is "watching" for signs of problems. It's probably quicker than I am and can watch for multiple signals.

          What I really want to do, however, is enter quickly as some good profit opportunities come fast and a bar or two (assuming some wait time to enter and confirm manual trades) can wipe out a good bit of the profit -- especially during flat trends or consolidation. So, I'd like to get back an automated confirmation so the script knows what to do next and eliminate the lag time.

          Thanks for the NinjaTrader reference. I saw that some folks in the trading strategies forum were using some old software also (forgot the name) that still apparently works in automated trading. So, there must be some interest -- it's just developing a way to make it happen. I haven't had a chance to look at Jason's script yet.

          If I find out anything else, I'll try to remember to post some other observations. Thanks for your help.


          Originally posted by stevehare2003


          However, if I understand what you are trying to do, you are talking about confirming actual trades in an automated manner. My personal risk tolerance dictates that this is not sufficient if you are trading live. IMHO, you need some positive confirmation that a trade has been entered/closed. I know there has been improvements in this area, but for purposes of automated trading, I am not sure if you will get that with the broker functions within eSignal. There have been companion products that have filled this gap in the past, dynaOrder comes to mind since I had used this add-in. However, that company went under and there is no support for the interface. Another eSignal Partner is NinjaTrader, they provide an interface that provides the type of direct feedback I believe you are after. (There may be others as well, but I am not familiar with them.)

          My recommendation is to develop your system by confirming the trades by using price action, ensuring you develop the logic modularly within different functions such that you can easily substitute another trade confirmation mechanism. When you get to the point of actually trading, look into this again. At that time, this functionality may be available through eSignal. If not, you can go use NinjaTrader or similar interface. Regardless, you would have already completed the hard part of developing the logic in your code and it will be relatively simple to make the changes you need.

          I hope this helps.

          Comment


          • #6
            Steve,

            I got an answer to my question in the trading strategies forum. Apparently, it can't be done today without a separate utility like DynaOrder or maybe the one you suggested.

            You have to do "order polling" and eSignal doesn't have that capability right now. I'm still going to review Jason's script as it seems that is what it does.

            Comment

            Working...
            X