Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Rebalance via CSV

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

    Rebalance via CSV

    Hello,

    I'm wanting to develop an automated order execution system that does this:

    1) launch application/script from scheduled task
    2) reads a CSV file to determine a desired position (e.g. /ESZ8, -100)
    3) connects to brokerX and takes current inventory (e.g. /ESZ8, 0)
    4) places a market order to make inventory sync with CSV (sell short 100 /ESZ8 @ market)
    5) close application

    Is Ninja a good choice for this application? Can anybody point me in the right direction?

    Thanks.

    #2
    Hi ninjakevin,

    Unfortunately that some of those steps are not available for automation through NinjaScript. NinjaScript is C# so it is very powerful, but for the advanced programming aspects of C#, we just cannot support them on the forums.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Which steps are supported? I'm well versed in c# and not afraid of extending the platform. I'm trying to understand what Ninjatrader can and can't do. Thanks

      Comment


        #4
        All except step 4 are outside the scope of NinjaScript. NinjaScript can place orders for you, but not any of the other stuff without some more advanced programming. Retrieval of inventory is not doable in NinjaTrader right now either.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Josh View Post
          Retrieval of inventory is not doable in NinjaTrader right now either.
          wouldn't that just be:

          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.

          Comment


            #6
            Those functions are not NinjaScript functions. They are for the DLL and COM interfaces. You will be programming outside of NinjaTrader for what you want anyways so it may work for you.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_Josh View Post
              Those functions are not NinjaScript functions. They are for the DLL and COM interfaces. You will be programming outside of NinjaTrader for what you want anyways so it may work for you.
              well for ninjascript functions wouldn't it just be marketposition and quantity?
              like
              Code:
              Print(Position.MarketPosition.ToString() + " " + Position.Quantity.ToString());

              Comment


                #8
                That gets you the position direction and its quantity based off of the strategy and not your account.
                Josh P.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by bortz, 11-06-2023, 08:04 AM
                47 responses
                1,607 views
                0 likes
                Last Post aligator  
                Started by jaybedreamin, Today, 05:56 PM
                0 responses
                9 views
                0 likes
                Last Post jaybedreamin  
                Started by DJ888, 04-16-2024, 06:09 PM
                6 responses
                19 views
                0 likes
                Last Post DJ888
                by DJ888
                 
                Started by Jon17, Today, 04:33 PM
                0 responses
                6 views
                0 likes
                Last Post Jon17
                by Jon17
                 
                Started by Javierw.ok, Today, 04:12 PM
                0 responses
                16 views
                0 likes
                Last Post Javierw.ok  
                Working...
                X