• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

getting open positions

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

    getting open positions

    We are finishing up a strategy and are coding position sizing based on Kelly Formula. In our calculations we would also like to use in the formula "number of current open positions" , Is there a function to get the open positions? We are using IB. Thanks for any help.

    #2
    Hello,

    There is not a supported function to get all open positions on all instruments.

    Each strategy instances will only be aware of the positions on that strategy. There is no cross communication between strategy instances and there is no way to read the position directly from another strategy.
    MatthewNinjaTrader Product Management

    Comment


      #3
      So is there no function to get portfolio? All in the same strategy.

      Comment


        #4
        Hello spiv1,

        Could you clarify what values you are looking for when you are referring to portfolio?

        Happy to be of further assistance.
        JCNinjaTrader Customer Service

        Comment


          #5
          We have studied extensively over our backtesting the amount of concurrent positions open in order to determine ASR (account size required) for each strategy so we have decided to incorporate the same logic in to our position sizing algo. So we simply need a count of open positions at the time a new signal is triggered. The position values like P&L, share quantity, etc etc is not relevant for the calculation. We just need to know the quantity of open positions. Thanks.

          Comment


            #6
            Hello,

            If this is all from the same strategy instance, you can get it using a Position object.

            Please see our Help Guide on these objects for more information:

            http://www.ninjatrader.com/support/h...7/position.htm

            As long as you have one strategy instance that is opening positions on these instrument, you can obtain the information. If you have separate instances running on different instruments, the position information cannot be shared.
            MatthewNinjaTrader Product Management

            Comment


              #7
              Yes. All from the same instance. Excellent. We will look at this right away. Thanks!!

              Comment


                #8
                Hello,

                I was having the same problem with the lack of inter-strategy communication that NinjaTrader offers. So, we went out of the bos to create a small algorithm to workaround this issue. Please read this article:

                http://www.aurorasolutions.org/inter...n-ninjatrader/

                Feel free to contact us if you need this implemented in your strategies.

                Thanks
                Umer

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by ketoproplus, Today, 05:08 AM
                0 responses
                3 views
                0 likes
                Last Post ketoproplus  
                Started by asmmbillah, Today, 03:55 AM
                0 responses
                4 views
                0 likes
                Last Post asmmbillah  
                Started by cmarkb, Today, 12:04 AM
                0 responses
                7 views
                0 likes
                Last Post cmarkb
                by cmarkb
                 
                Started by supernova0219, Yesterday, 07:48 PM
                0 responses
                10 views
                0 likes
                Last Post supernova0219  
                Started by qwfxny, Yesterday, 07:20 PM
                0 responses
                12 views
                0 likes
                Last Post qwfxny
                by qwfxny
                 
                Working...
                X