Announcement

Collapse
No announcement yet.

Where do I insert IBbroker code

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

  • Where do I insert IBbroker code

    Where do I insert the '' trade.Sell(getSymbol(), 1, IBBroker.MARKET); '' code:

    function onAction2() {
    if (vLastAlert != 2) Strategy.doSell("", Strategy.CLOSE, Strategy.THISBAR, Strategy.DEFAULT, 0);
    vLastAlert = 2;
    }

    I have tried to replace the '' Strategy.doSell '' with IBBroker sell code but without success.

    Should use a doSell functionÉ

    function doSell(); {¨
    trade.Sell(getSymbol(), 1, IBBroker.MARKET);
Working...
X