Announcement

Collapse
No announcement yet.

using buyMarket within an efs

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

  • using buyMarket within an efs

    buyMarket buys into a long position. sellMarket sells out of a long position. sellShortMarket sells into a short position. But there doesn't seem to be a command for buying out of a short position. Any ideas?

  • #2
    Hello Shaner,

    You can use closePostion() or any buy...() function to close a short position.
    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


    • #3
      OK, thanks. I can't get buyMarket to cover a short position. But, as you suggested, closePosition works and I think that will take care of what I need.

      Comment


      • #4
        Hello Shaner,

        Which broker are you using? Also, what are the eSignal and Broker plug-in build numbers you are using?
        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


        • #5
          I'm not hooked up between eSignal and my FCM (ADMIS) until I have finished testing; so for now am just paper trading this.
          eSignal: 10.4.1540.1035
          Broker plug-in: ?? How do I tell?

          Comment


          • #6
            Generic Broker Functions Clarifications

            Hi,
            please before trading with real money I need some clarifications. I read the EFS Glossary but it was not enough.
            buyMarket to open a long position.
            sellMarket to close a long position.
            sellShortMarket to open a short position.
            closePosition to close long or short position.
            Correct ???
            If I am long and want to reverse to a short position or I'm short and want to reverse to long position what kind of generic broker function have to use ???
            Thanks.
            Massimo

            Comment


            • #7
              I am using the following, as you listed:

              buyMarket to open a long position.
              sellMarket to close a long position.
              sellShortMarket to open a short position.
              closePosition to close long or short position.

              There does not seem to be a buyXXXXX that will buy out of a short.

              As to being long and wanting to reverse to a short, I am first using closePosition and then using sellShortMarket.

              As to being short and wanting to reverse to a long, I am first using closePosition and then using buyMarket.

              For now, I am using eSignal to just give me the signals that I then enter into my software at ADMIS (JTrader). I have not figured out how to connect between eSignal and JTrader but I understand that maybe we can't do that yet??

              Comment

              Working...
              X