Announcement

Collapse
No announcement yet.

Generic Broker - How to scale out?

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

  • Generic Broker - How to scale out?

    i am developing strategy that is in the market 100% or the time so i could test the esignal paper trading system.
    I am using the generic broker functions buyMarket(getSymbol(),1) and sellShortMarket(getSymbol(),1) and was hoping that when the sell short order is placed, it would automatically close the long position, however the I get an error saying "order has been rejected: you cannot place an open order at the moment. Please close an existing opposite side position first". I then used closeposition() which worked but it does not help as I am only trying just to scale out.

    Can anyone point me in the right direction please? Thanks.

  • #2
    Can anyone give me a hand? Here's what I'm doing:

    // Open Position

    // Long
    buyMarket(....)

    // Short
    sellShortMarket(....)


    // Close Long
    sellMarket(....) -- this work OK!

    // Close Short
    buyMarket(...) -- ERROR !, Account Manager rejects the order saying I need to close the position first...

    Comment


    • #3
      Hello ccasadei,

      Unfortunately, EFS does not have the ability to scale out of a short position in an automated manner. This is something that will be corrected when we complete the GB functionality next year.

      What you can do for the time being is set EFS confirmations to enabled and then manually change the order action to Buy to Cover in the order ticket window.
      Jason K.
      Project Manager
      eSignal - an Interactive Data company

      EFS KnowledgeBase
      JavaScript for EFS Video Series
      EFS Beginner Tutorial Series
      EFS Glossary
      Custom EFS Development Policy

      New User Orientation

      Comment

      Working...
      X