Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

dll shortcoming

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

    dll shortcoming

    Hi, I just got NT going yesterday and it was not difficult to change an indicator in Tradestation to one that is placing orders with my IB simulation account. I appreciate the clarity of documentation and good working order of the dll.

    One suggestion so far: I would love it if the command NTMarketposition would return the number of contracts/shares as well as the marketposition. The dll seems incomplete without that capability. I am deploying a strategy that trades just one contract of the YM all day, always in the market. If I am off by one contract then the whole thing is off pretty badly for the day if the one extra contract is not in the market direction.

    I can write a unit of code to keep track of all the order id's and their positions to make sure I am not holding more than one contract in either direction but it is extra code and extra cpu cycles and I'm guessing that the IB API would give up the number of contracts if the dll asked for it.

    #2
    - value > 0: Long
    - value < 0: Short
    - value = 0: Flat

    Comment


      #3
      Funny, according to the docs it should return a value from -1 to 1 but I am getting the number of contracts... which is what I was suggesting!!

      Comment


        #4
        Where in the DOC? For sure this needs to be corrected. This is what we have:

        int MarketPosition(string instrument, string account)

        Gets the market position for an instrument/account combination. Returns 0 for flat, negative value for short positive value for long. This function will only return values for positions initiated via the ATI.
        RayNinjaTrader Customer Service

        Comment


          #5
          I must have been mixed up. I guess I was tired and read <0 as -1. Sorry

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Barry Milan, Yesterday, 10:35 PM
          7 responses
          19 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by AttiM, 02-14-2024, 05:20 PM
          10 responses
          179 views
          0 likes
          Last Post jeronymite  
          Started by ghoul, Today, 06:02 PM
          0 responses
          9 views
          0 likes
          Last Post ghoul
          by ghoul
           
          Started by DanielSanMartin, Yesterday, 02:37 PM
          2 responses
          13 views
          0 likes
          Last Post DanielSanMartin  
          Started by DJ888, 04-16-2024, 06:09 PM
          4 responses
          13 views
          0 likes
          Last Post DJ888
          by DJ888
           
          Working...
          X