Announcement

Collapse
No announcement yet.

IBTrade

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

  • IBTrade

    Hi Arie,

    Could you tell me what is "IBtrade" in your code example? Where can I find document about it? Thanks.

    -- Clearpicks


    Originally posted by arieal
    Hi Jason
    Thank you for your last reply. Here is more:

    26. In my efs (real time trading with IB) I have a button to start.
    Then, when I hit the button the code checks for close(-1), if it's above/below some value, I buy/sell at Market.
    The problem is that after hitting ON on the button, the trade is done only at the begining of the next candle, and in a 10 minute chart for ER2, that might be a long time.
    How can I get the current market value when the efs runs first time, and then trade at Market, in the same bar?

    27. The same problem I am having when Interrupting for Lunch.
    If it's between 12:00 and 13:00, I do a return, and then the first trade is done only at 13:10 on a 10 min chart.
    This I can fix by moving my time to 12:50, but for the efs start in the morning I have no solution.

    28. I understand that in a Tick chart (in real time) the efs runs at every tick. How often does the efs run on a emini minutes chart?

    Code example:
    function ONOFFButton()
    {
    if (TradingSystemONOFF) { TradingSystemONOFF = false; }
    }

    main(...) {
    if (TradingSystemONOFF) {
    //Buy Condition
    if ((close(-1) > study + crossOffset) && !StrategyisLong) {
    nNewTrade = 1; // New Trade Trigger
    nsignal = 1; // Buy Signal - Trade Type
    ...
    }
    if (nNewTrade == 1) { //Execute New Trade
    if (StrategyisInTrade == true) {
    ...
    }
    } else { //Enter New position, i.e. use One lotSize
    if ((nsignal > 0)) {
    IBtrade.Buy(getSymbol(), lotSize, IBBroker.MARKET);
    ...
    } // end if IN TRADE
    } // END EXECUTE NEW TRADE
    ...
    }
    Many thanks, Arie

  • #2
    Re: IBTrade

    Hi Clearpicks
    - var IBtrade = new IBBroker;
    - Documentation about this object you can find in:
    /eSignal/DOCS/EBEFS.doc
    Arie

    Comment


    • #3
      Re: Re: IBTrade

      Hi Arie,

      Thanks. I will spend some time this weekend to test these APIs. Have you found solutions for all problems you encountered while building your system using these APIs? Could you let me know any pitfall I should avoid or tricks I should use? Your help is greatly appreciated.


      -- Clearpicks


      Originally posted by arieal
      Hi Clearpicks
      - var IBtrade = new IBBroker;
      - Documentation about this object you can find in:
      /eSignal/DOCS/EBEFS.doc
      Arie

      Comment

      Working...
      X