Announcement

Collapse
No announcement yet.

Generic Broker Functions in v11

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

  • Generic Broker Functions in v11

    I have been using the Generic Broker Functions in v10.6 to trade through Interactive Brokers, and these have worked fine.
    If I use the same efs code in v11.5, I receive error messages such as:

    C:/Users/hp/Documents/Interactive Data/Formulas/My Formulas/H.efs, line 4422: Error: Function 'buyStop': is invalid exchange for this contract
    C:/Users/hp/Documents/Interactive Data/Formulas/My Formulas/H.efs, line 4523: Error: Function 'sellShortStopLimit': is invalid exchange for this contract
    C:/Users/hp/Documents/Interactive Data/Formulas/My Formulas/H.efs, line 4413: Error: Function 'buyLimit': is invalid exchange for this contract

    No orders are sent to IB and the efs code blows up. What should I be doing differently? Is there documentation?

  • #2
    Hello Odgo,

    There are a couple of things that you'll want to check,

    1- Which broker do you have set for the Trading Default Connection? (Options -->Applications Properties-->Trading Default Connection)
    2- Can the instrument you're trading be added to the Trade Manager window and if so are you getting data for it?


    AveryH
    eSignal Support

    Comment


    • #3
      In answer to Avery's questions:

      1. My default broker connection for futures trading is Interactive Brokers.
      2. Yes, the futures contracts I trade are available & priced correctly in the Trade Manager.

      Upon further investigation, I believe the problem I'm having is due to inadequate documentation for the Generic Broker Functions. This documentation was updated for eSignal v11 but is incomplete & ambiguous. For example, KB article 1860 describes the buyMarket() function. I believe the third parameter named 'route' is no longer optional as it was in eSignal v10 & must be set to "GLOBEX" or "ECBOT" or "NYMEX" or whichever electronic exchange your broker will use to execute your order for a specific contract. The fourth parameter named 'expiry' is assigned the value "200506" in the Interactive Brokers' example given in KB 1860. I don't think this can be correct. I think this parameter needs to be assigned one of the three constants given for 'expiry' in the table above the IB example, which values are the same as in v10 (and equivalent to the integers 1, 2 & 3). The following function call produces a successful order with IB in v11: buyMarket("CL H3=1", 1, "NYMEX", SB_DAY)

      Comment

      Working...
      X