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 Rogers101, 05-05-2024, 11:30 AM
                    22 responses
                    66 views
                    0 likes
                    Last Post Rogers101  
                    Started by reynoldsn, 05-04-2024, 02:34 PM
                    2 responses
                    24 views
                    0 likes
                    Last Post reynoldsn  
                    Started by ttrader23, Today, 09:04 AM
                    1 response
                    4 views
                    0 likes
                    Last Post NinjaTrader_Gaby  
                    Started by geotrades1, Today, 07:54 AM
                    8 responses
                    18 views
                    0 likes
                    Last Post geotrades1  
                    Started by SnailHorn, Today, 08:38 AM
                    1 response
                    1 view
                    0 likes
                    Last Post NinjaTrader_ChelseaB  
                    Working...
                    X