• 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

managing multiple orders on multiple instruments

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

    managing multiple orders on multiple instruments

    Hi guys,

    I am currently going live with an automated strategy based on end of day data that I would like to execute on all stocks in the S&P 500. However, to test it I would like to test it with just one order first. For example, if before the opening conditions are met for 10 stocks, I would like to enter only for one stock. Could you please explain me how to do this?

    Thank you

    #2
    Hello Manuel17,

    Thank you for your post.

    You can just run the strategy on one stock then by going to the Strategies tab of the Control Center > right click > select New Strategy > select your strategy > select the stock you wish to use > OK > Enable.

    For information on running automated strategies please visit the following link: http://www.ninjatrader.com/support/h...strategies.htm

    Please let me know if I may be of further assistance.
    Patrick H.NinjaTrader Customer Service

    Comment


      #3
      Thank you Patrick, but if I would like to test my strategy on multiple instruments at once and I would like to avoid to look for all the stocks in the S&P 500 to see for which one the conditions are met. Is there a code to avoid multiple orders the same day before opening?

      Comment


        #4
        Hello Manuel17,

        Thank you for your response.

        Then are the instruments all added in the strategy? If so, you can create a custom counter to ensure it does not exceed the desired amount on the first day of trading and then reset afterwards. We do not have any examples of this.

        You will need to count either the Position.Quantity or executions on the first day. For information on OnExecution() and OnPositionUpdate() please visit the following links:

        You will also need to check the DateTime objects to ensure one day has passed before resetting the values. Please visit the Data section of the NinjaScript items in the Help Guide for information on items like ToTime() and Time:

        Please let me know if you have any questions.
        Patrick H.NinjaTrader Customer Service

        Comment


          #5
          Thank you Patrick. My strategy will be calculated on daily bars. If I enable the strategy outside of trading hours, would the orders be entered?

          Comment


            #6
            Hello Manuel17,

            You will need real-time data for NinjaTrader to be able to place live orders so if there is no data coming in then your strategy will not be able to submit a live order.

            Let us know if you have any questions.
            JCNinjaTrader Customer Service

            Comment


              #7
              Thank you for your reply JC. I have real time data from Kinetick. My strategy runs on daily data, not intra-day. After trading hours, I would like to enable my strategies and my orders be entered automatically. Is it possible to do this?

              I am a new user to the platform, sorry to ask rookie questions!

              Comment


                #8
                Hello Manuel17,

                Thank you for your response.

                You would need an update to the bar data to call the OnBarUpdate() method in NinjaScript, so any after hours submission of orders would need to check either the extended trading hours (setting your strategy to run on an ETH session template and then only trade on RTH hours) or another instrument that is trading after the close of the day for the primary instrument.

                For a reference sample on limiting the time of day you trade please visit the following link: http://www.ninjatrader.com/support/f...ead.php?t=3226

                For information on using multiple instruments and timeframes in your strategy please visit the following link: http://www.ninjatrader.com/support/h...nstruments.htm

                We have Premium Paid Educational events where you will join a NinjaScript expert for a pair of 6-8 hour long intensive courses designed to provide you with an in depth look at programming indicators and automated strategies through the use of NinjaScript:
                http://www.ninjatrader.com/PremiumEducation.php

                If you would like to take on learning NinjaScript on your own, we have a fully documented help guide which will help you get started with Ninja Script. You will find language references to all of the methods and functions you will be using. You will also see a tutorial section which will help you create your first indicator and get you started with some of these concepts.
                A link to our Help Guide can be found below: http://www.ninjatrader.com/support/h...stribution.htm

                I am also linking you to the Educational Resources section of the Help Guide to help you get started with NinjaScript: http://www.ninjatrader.com/support/h..._resources.htm

                You will find Reference Samples online as well as some Tips and Tricks for both indicators and strategies:
                Click here to see our NinjaScript Reference Samples: http://www.ninjatrader.com/support/f...splay.php?f=30
                Click here to see our NinjaScript Tips: http://www.ninjatrader.com/support/f...ead.php?t=3229

                These samples can be downloaded, installed and modified from NinjaTrader and hopefully serve as a good base for your custom works.

                There is a also a growing library of user submitted custom indicators (100+) that can be downloaded from our support form. Please look in the NinjaScript File Sharing section of our support forum as you may find what you are looking for there: http://www.ninjatrader.com/support/f...splay.php?f=37

                If you have limited time or programming capabilities, you can discuss your requirements with any of our certified NinjaScript consultants.
                Click here for a list of certified NinjaScript Consultants: http://www.ninjatrader.com/Ecosystem/NonBroker.php#81

                Please let me know if you have any questions.
                Patrick H.NinjaTrader Customer Service

                Comment


                  #9
                  Thank you Patrick for this comprehensive reply! Really appreciated

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by jleira, Today, 10:26 PM
                  0 responses
                  4 views
                  0 likes
                  Last Post jleira
                  by jleira
                   
                  Started by wuileng, Today, 10:14 PM
                  0 responses
                  6 views
                  0 likes
                  Last Post wuileng
                  by wuileng
                   
                  Started by mntemel, Today, 09:07 PM
                  1 response
                  10 views
                  0 likes
                  Last Post MojoJojo  
                  Started by martyn73, Today, 08:22 PM
                  0 responses
                  10 views
                  0 likes
                  Last Post martyn73  
                  Started by RobertoPaez, Today, 08:13 PM
                  0 responses
                  5 views
                  0 likes
                  Last Post RobertoPaez  
                  Working...
                  X