Announcement

Collapse
No announcement yet.

Managing Multiple Unique IB orders with EFS

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

  • Managing Multiple Unique IB orders with EFS

    I was wondering if the OPEN ORDER data could somehow be pulled into an EFS at the start of the day, or on demand. Problem is that the EFS works very well managing day trades, but if one of the following occurs, all control over the trade is lost...

    1. Interval accidentally changed on the chart where the EFS is residing and managing the active trade

    2. the active EFS is accidentally reloaded

    3. eSignal crashes and needs to be reloaded

    4. the market closes

    ***********
    Also, in the list of broker functions, there doesn't seem to be a provision for...

    1. trailing stops

    2. modifying active orders (ie: stops)

    For example, if I'm in a trade and have an pending active order (ie: stop) in place that was executed via the EFS through the IB Bridge, how do I call up and modify that specific active order? Say I want to adjust the price or even the quantity... Do I have to cancel the order and start again or...? Does each active order possess a unique identifier parameter somewhere that we can grab onto or...?

    Currently all trade conditions are managed entirely in the EFS and only BUYMARKET() and SELLMARKET() orders are being utilitzed to control the trades. The danger of course is that once control of the trade is released the user then needs to get in their TWS and manually control the trades. This is a pain to be sure.

    ***********
    Lastly, is there a way to prevent a user from modifying the interval on a a chart that is running an active script?


    Any help or insight would be greatly appreciated.

    Regards, Ryan.

  • #2
    Hello Ryan,

    The GBF are not intended for complete auto-mated trading purposes. This is something we plan to work on in the future. Please see this post for more details.

    EFS does not have the ability to prevent a user from changing the chart interval or symbol. However, within your EFS you can record the initial symbol and interval with getSymbol() and getInterval() and store them in the global scope of the app using setGlobalValue(). Add a routine inside of a BARSTATE_ALLBARS condition, which occurs when the chart symbol or interval is changed, and prevent the rest of your code in main from executing with a return statement. You could also write a text message to the chart with drawText() to inform the user.
    Jason K.
    Project Manager
    eSignal - an Interactive Data company

    EFS KnowledgeBase
    JavaScript for EFS Video Series
    EFS Beginner Tutorial Series
    EFS Glossary
    Custom EFS Development Policy

    New User Orientation

    Comment


    • #3
      Hi Jason,

      After working through your suggestion I realized that once ALLBARS is called the script has by this time been re-initialized.

      The GlobalValue functionality is pretty cool and the script recognizes that a chart based an interval (or stock) that is different from the stored global value has been generated, but I can't get it to interrupt the refresh and preserve the PRIOR STATE.... all is lost.

      Any suggestions?

      Regards,
      Ryan.

      Comment


      • #4
        Hello Ryan,

        You cannot interrupt the chart refresh from EFS once the user has changed the symbol or interval. The logic I gave only gives you the ability to detect the event so that you could display a message to the user to provide more info. This condition could also be used to prevent main() from continuing to execute if you desire.
        Jason K.
        Project Manager
        eSignal - an Interactive Data company

        EFS KnowledgeBase
        JavaScript for EFS Video Series
        EFS Beginner Tutorial Series
        EFS Glossary
        Custom EFS Development Policy

        New User Orientation

        Comment


        • #5
          Sort of like closing the barn door after the horse has already left... but I appreciate the clarification nontheless.

          I want you to know that I sincerely appreciate your efforts and diligence in maintaining this forum. It is a very useful tool.

          Regards,
          Ryan.

          Comment


          • #6
            Thank you for your comments and feedback.

            Once we get into the development of the automation features, there may be some additional requirements that we'll need to consider, such as what you are looking for here. We would appreciate your input in this area when the time comes.
            Jason K.
            Project Manager
            eSignal - an Interactive Data company

            EFS KnowledgeBase
            JavaScript for EFS Video Series
            EFS Beginner Tutorial Series
            EFS Glossary
            Custom EFS Development Policy

            New User Orientation

            Comment


            • #7
              I would be happy to contribute in any way that I can. You can email me privately for my contact information. In the meantime, take care.

              Regards,
              Ryan

              [email protected]

              Comment

              Working...
              X