Announcement

Collapse
No announcement yet.

Connection.isLiveTrading() - Not as documented

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

  • Connection.isLiveTrading() - Not as documented

    Documentation states that the function Connection.isLiveTrading() "Returns false if setLiveTrading() was set to false or live trading GUI override is set to disabled." Using my Interactive Brokers' simulated account with Trade.setLiveTrading(true) and with both the global and symbol-specific GUI switches enabled, the function evaluates to false. There is some truth to the "false" conclusion since the trading is not live but only simulated; however, the current documentation would lead me to expect the result to evaluate to true. Suggest adding a separate function that evaluates to true if both GUI switches are enabled and to false if either is disabled. Currently, if I issue an EFS-AT order when either GUI switch is disabled, the EFS formula blows up and writes to Formula Output. My suggested function could be used to prevent this from happening.

  • #2
    I believe my prior post regarding what causes the EFS to halt and log an error to Formula Output is incorrect. Issuing an AT order with disabled GUI switches will not by itself cause such an error (if a connection to a broker exists). The AT order is simply ignored, leaving it as an exercise for the trader/programmer to figure out why. A function that monitors the state of the switches would be useful.

    Comment


    • #3
      it would be really bad it that would change

      I am actually very happy that this is like that.
      I do not want to recompile and change my program .
      I do not want to have one program for live IB account and one for test IB account.
      form signal and efs point of view demo and live accounts are the same - they are 'live' account, and only IB decides if that's truly live or not

      Comment


      • #4
        AdamS01:

        I don't think we're discussing the same issue. I am referring to the two manual switches labeled "EFS" that start out grey and become green once the trader manually enables them. Correct me if I'm wrong, but an EFS-AT order will never find its way to a connected broker unless both these switches (one global switch located in the status bar and one local switch located in the chart of the symbol being traded) are enabled and display as green. If I start the eSignal program and forget to enable these switches, no EFS-AT trading will occur (the global switch always starts in the disabled state; the symbol-specific switches stay enabled if previously so set). If there were a function that tells me the switches are disabled, I could avoid issuing EFS-At commands that will have no effect. What one would really like is to be able to set these switches programmatically, but my guess is the developers have purposely placed this manual speed-bump in the process so that automated trading does not run amuck unattended.

        odgo

        Comment


        • #5
          Hello Odgo,

          Function Connection.isLiveTrading ([ConnectionID]) returns false if connected with DEMO account, true if connected with LIVE account, and null if not connected.
          If connection is not defined EFS uses the default.
          EFS GUI switchers and setLiveTrading(bool) function have no effect on the Connection.isLiveTrading() function result. We will revise the documentation to reflect this.


          Best Regards,
          AveryH
          eSignal Support

          Comment


          • #6
            Hi eSignal_AveryH,

            Is there a function that lets us know if either the chart or global EFS GUI are off? As odgo pointed out, the global switch is disabled each time eSignal turns on, so it would be nice to have an automated way to tell if both the chart EFS mode and global EFS mode are enabled / disabled. We just had an issue today where we forgot to enable the global EFS and lost out on several automated trades.

            Comment

            Working...
            X