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 naanku, Today, 07:25 PM
                0 responses
                6 views
                0 likes
                Last Post naanku
                by naanku
                 
                Started by milfocs, Today, 07:23 PM
                0 responses
                5 views
                0 likes
                Last Post milfocs
                by milfocs
                 
                Started by PaulMohn, Today, 06:59 PM
                0 responses
                7 views
                0 likes
                Last Post PaulMohn  
                Started by bortz, 11-06-2023, 08:04 AM
                48 responses
                1,755 views
                0 likes
                Last Post carnitron  
                Started by Jonker, 04-27-2024, 01:19 PM
                3 responses
                24 views
                0 likes
                Last Post NinjaTrader_Manfred  
                Working...
                X