Announcement

Collapse
No announcement yet.

Error: connection is not ready. Please help!

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

  • Error: connection is not ready. Please help!

    Hi,

    I'm connecting to IB through Broker Manager, but get the following error message each time a buy or sell signal is triggered. Please help!

    line 413: Error: Function 'sell': connection is not ready.

    //Sell
    if (((vMA1_1 > vMA2_1) && (vMA1 < vMA2)) && (triggeredshort == false))
    {
    debugPrintln("SELL nSignal " + nsignal + " islong " + islong);
    if (bShowL)
    {
    drawShape( Shape.DOWNTRIANGLE, AboveBar4, Color.red);
    }
    Alert.addToList("EUR A0-FX", "Short_30", Color.black, Color.red);
    Alert.playSound("swoosh.wav");

    // NEWTRADE
    nNewTrade = 1; // New Trade Trigger
    nsignalOrg = nsignal; // capture original nsignal
    nsignal = -1; // Sell Signal - Trade Type
    debugPrintln("Signal for Sell done")

    if (vMAdiffShort >= 0.00005)
    {
    Alert.email("SignalShortSteep_30");

    if (inTrade == true)
    {
    if ((nsignal == -1) && (islong == true))
    {
    drawShape( Shape.DOWNARROW, AboveBar3, Color.red);
    Alert.email("ReverseLongSteep_30 ");
    Alert.addToList("EUR A0-FX", "ReverseLong_30", Color.black, Color.red);
    // sellMarket( "EUR A0-FX" ,2);
    sell( "EUR A0-FX" );
    sell( "EUR A0-FX" );
    islong = false;
    isshort = true;
    triggeredshort = true;
    triggeredlong = false;
    alertshort = false;
    alertlong = false;
    }
    }
    else
    {
    if (nsignal == -1)
    {
    drawShape( Shape.DOWNARROW, AboveBar3, Color.red);
    Alert.email("GoShortSteep_30 ");
    Alert.addToList("EUR A0-FX", "GoShort_30", Color.black, Color.red);
    sell( "EUR A0-FX" );
    isshort = true;
    islong = false;
    inTrade = true;
    triggeredshort = true;
    triggeredlong = false;
    alertshort = false;
    alertlong = false;
    }
    }

    }

  • #2
    SellMarket(getSymbol(), 10) or Sell() or closepostion() all give me connection error?

    ]


    [QUOTE=tbfx;144580]Hi,

    I'm connecting to IB through Broker Manager, but get the following error message each time a buy or sell signal is triggered. Please help!
    ...: Error: Function 'sell': connection is not ready.

    sellMarket( "EUR A0-FX" ,2);
    sell( "EUR A0-FX" );

    IB informed it is the function issue - I have tried everything - I need help please
    is there a set up that I need to be aware of between IB and eSignal?
    Much appreciated

    Comment


    • #3
      Is there a conflict with your Client ID? Try changing that, close and restart eSignal, see what happens.

      Comment


      • #4
        Originally posted by SteveH View Post
        Is there a conflict with your Client ID? Try changing that, close and restart eSignal, see what happens.
        Thanks for your response SteveH. Not sure I understand what you mean with Client ID. Please explain. Cheers, tbfx.

        Comment


        • #5
          Both Broker Manager and TWS show connection is ok, but when I run buyMarket(getSymbol(), 1) I get a connection error.

          Comment


          • #6
            Dear All,

            It turned out that this error was caused by an incorrect setting in the "edit symbol" box within "broker manager".

            Regards,
            tbfx

            Comment

            Working...
            X