• 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

NTStrategyPosition in simulator mode

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

    NTStrategyPosition in simulator mode

    Will NTStrategyPosition work to call up the position of a strategy while in Simulator mode?

    I have a position check in a TradeStation strategy that is not executing correctly in NT. NT keeps adding positions each bar when it should only hold one contract and either reverse or exit.

    #2
    Hello Shutson,

    Yes, it should read the strategy position for the specified strategy. Unfortunately I'm not sure how you would debug this exactly in TS, but I would make sure the equivalent code in TS is generating a value that you expect.

    string NTStrategyPosition(string strategyId)
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Do I need to specify a strategyId in the code or does NT assign its own? Currently I have the test specified as:

      If NTStrategyPosition("") = 0 then begin

      Yet it continues to run the subroutine even though the strategy took a position during the last bar that remains open.

      Comment


        #4
        I'm not sure if you need to specify a strategy ID here. I will have our TradeStation expert follow up with you tomorrow. Thank you for your patience.
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          Passing a strategy id in is optional, but needed should you wish to reference it from other functions via your TS code - http://www.ninjatrader-support.com/H...arameters.html
          BertrandNinjaTrader Customer Service

          Comment


            #6
            Thank you Bertrand.

            Are you aware of any resource for coding / debugging TradeStation strategies that are executed in NinjaTrader? The sections of NT help pertaining to TS are rudimentary at best. TS does not appear to allow discussions of other platforms on their support forum so there is no help there.

            Comment


              #7
              Unfortunately I'm not aware of any specific sections to point you to, you can review our NTSample for the basics to get started and from there it would be using the helpguide for the functions and the easy language output to debug.
              BertrandNinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by digibob, Today, 10:01 PM
              0 responses
              1 view
              0 likes
              Last Post digibob
              by digibob
               
              Started by ptertich, Today, 09:59 PM
              0 responses
              1 view
              0 likes
              Last Post ptertich  
              Started by sledge, Today, 06:11 PM
              1 response
              8 views
              0 likes
              Last Post sledge
              by sledge
               
              Started by Bionian, Today, 02:46 PM
              2 responses
              9 views
              0 likes
              Last Post NinjaTrader_Jesse  
              Started by rwilliam, Today, 01:54 PM
              1 response
              19 views
              0 likes
              Last Post NinjaTrader_Jesse  
              Working...
              X