Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Check Account Positions

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

    Check Account Positions

    Hello,

    Is there a way using NinjaScript to check the account positions, instead of the strategy positions, inside of a strategy?

    Thanks in advance.

    #2
    happyfatguy,

    This is not supported in NT6.5. In NT7 you can check account values, but not account positions.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Outside DLL

      Hi Josh,

      Thanks for the quick reply. Is there anyway to incorporate an external DLL or to read a text file from within NinjaScript? (No need to example code, just trying to understand if the capability exists)

      Thanks!

      Comment


        #4
        happyfatguy,

        If you want to read from a text file you can use C#'s StreamReader capabilities. Please see here: http://www.ninjatrader-support2.com/...ead.php?t=3476

        Or you can also try this one: http://www.ninjatrader-support2.com/...ead.php?t=3477
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Thanks!

          Terrific. Thank you very much.

          Comment


            #6
            Using Statements

            Hi again,

            So I'm implementing the strategy and want it to read from a text file. I am having trouble getting the strategy to accept a using "System.IO;" statement as valid though. Can only indicators utilize this class?

            Comment


              #7
              Please be sure you have added the required using lines up top.
              Josh P.NinjaTrader Customer Service

              Comment


                #8
                System.IO

                Hi,

                Thanks for the quick reply.

                Correct. It's not accepting "Using System.IO;" as a valid statement in the Using declarations region on top. The same line is accepted just fine on an indicator. Was just wondering if perhaps it is restricted on the strategies, but not on the indicators?

                Comment


                  #9
                  Please use a lower case U for "using". It should work.
                  Josh P.NinjaTrader Customer Service

                  Comment


                    #10
                    Thanks!

                    Thank you very much. I'm a VB.Net guy - often mess up that syntax.

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Johnny Santiago, 10-11-2019, 09:21 AM
                    95 responses
                    6,193 views
                    0 likes
                    Last Post xiinteractive  
                    Started by xiinteractive, 04-09-2024, 08:08 AM
                    2 responses
                    11 views
                    0 likes
                    Last Post xiinteractive  
                    Started by Irukandji, Today, 09:34 AM
                    1 response
                    3 views
                    0 likes
                    Last Post NinjaTrader_Clayton  
                    Started by RubenCazorla, Today, 09:07 AM
                    1 response
                    5 views
                    0 likes
                    Last Post RubenCazorla  
                    Started by TraderBCL, Today, 04:38 AM
                    3 responses
                    25 views
                    0 likes
                    Last Post NinjaTrader_Jesse  
                    Working...
                    X