Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Is Ninjatrader/NinjaScript right for my needs?

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

    Is Ninjatrader/NinjaScript right for my needs?

    I'm trying which is better for my needs, NT or IB. NT looks much simpler to learn than the IB API, but I'm not sure if Ninjatrader/NinjaScript is right for what I'm looking for. Specifically, I'm looking to follow about 200+ instruments, with snapshots of "last trade price" every few seconds. I definitely don't need tick data, and in fact think it will overwhelm my program.

    I also want to be able to control the exact time that my snapshots are taken. For example, if I want snapshots of ES every 10 seconds starting at 09:30:00, my first 3 time points will represent "last trade price" as of 09:30:00, 09:30:10, 09:30:20, even if they don't arrive on my computer until seconds later. I may also need to go backwards and get specific time points retrospectively if my connection is temporarily lost. For example, it may be 09:35:55 and I need to get the "last trade price" as of 09:35:40.

    Is this sort of thing possible with NT and Kinetick? If so, can you direct me to the keywords/functions I would use. Thank you.

    #2
    Hello YD777,

    Thanks for your post and Welcome to the Ninjatrader forums.

    You can certainly set the bar size/type to your needs.

    Here are some links on Ninjascript and strategies along with some references samples.
    For information on running strategies please visit the following link: http://www.ninjatrader.com/support/h...strategies.htm

    If you would like to take on learning NinjaScript, 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...?tutorials.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+) and strategies 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

    Here is a link to the IB connection guide: http://ninjatrader.com/ConnectionGui...nnection-Guide

    Here is a link to Kinetic connection guide: http://ninjatrader.com/ConnectionGui...nnection-Guide
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Thank you for the reply.

      I see that OnBarUpdate( ) has the option of only being called on bar close, and that's great because I wouldn't want my indicators calculated every tick. But Ninjatrader is still able to "know" the OHLCV for the bar. How is this accomplished? It seems that my program is still receiving all the tick data and processing it in other functions behind the scenes. If this is done for 200 highly liquid instruments, it would be a huge drain my system.

      Is there a way for Ninjatrader to communicate with it's datafeed and say something like "just send me snapshots of data every second, containing the OHLCV for that second"? If so, how would I accomplish this?

      Comment


        #4
        Originally posted by YD777 View Post
        Thank you for the reply.

        I see that OnBarUpdate( ) has the option of only being called on bar close, and that's great because I wouldn't want my indicators calculated every tick. But Ninjatrader is still able to "know" the OHLCV for the bar. How is this accomplished? It seems that my program is still receiving all the tick data and processing it in other functions behind the scenes. If this is done for 200 highly liquid instruments, it would be a huge drain my system.

        Is there a way for Ninjatrader to communicate with it's datafeed and say something like "just send me snapshots of data every second, containing the OHLCV for that second"? If so, how would I accomplish this?
        You would use a snapshot datafeed, like IB. I do not know if or how to specify a snapshot frequency for them, reason being that their snapshot data is why I refuse to use them: I want all the data. Strange, is it not, how traders want different things, so criticise precisely something that another trader wants?

        Comment


          #5
          With a professional data feed you will get every single tick supplied by the data provider. NinjaTrader will use these ticks to update the bars on the chart or called via the market analyzer.

          All those ticks will be ignored for the purpose of calculating indicator values, as long as the indicators are set to CalculateOnBarClose = true. The indicator calculations will only take place, once the bar is complete.

          All indicators that I have coded have been tested in market replay with speed x500 and setting CalculateOnBarClose = false (calculating with every single tick). NinjaTrader can easily handle this. However, I have not been connecting to 200 symbols in parallel.

          Comment


            #6
            Hello YD777,

            Thanks for your reply.

            As member Harry advised, the platform will get all of the ticks and the key is how often your evaluation code is executed. You can control how often it is executed in two ways, set CalculateOnBarClose to execute on every incoming Tick and this would be CPU intensive, or set CalculateOnbarClose = true where the code is executed at the end of the bar. You can also dictate the bar size. For example, if you want to update your code on a 5 minute basis, use 5 minute bars.
            Paul H.NinjaTrader Customer Service

            Comment


              #7
              Thanks everyone for the replies.

              Koganam, I understand why you and most others would want every tick. I simply don't want it because I think my program wouldn't handle it for 200 symbols in real time. In the ideal setting, I would want my program to process every tick too!

              Harry, it's promising that NT is able to handle the load your backtesting puts on it, but like you say, not sure about 200 symbols in parallel. Anyone out there use NT for large numbers of symbols at once?

              Are there any data providers that provide snapshot data other than IB? If they are the only one, then it probably would just make more sense for me to write to their API and use them, even though it would undoubtedly take longer.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Stanfillirenfro, Today, 07:23 AM
              1 response
              3 views
              0 likes
              Last Post NinjaTrader_Gaby  
              Started by cmtjoancolmenero, Yesterday, 03:58 PM
              2 responses
              20 views
              0 likes
              Last Post cmtjoancolmenero  
              Started by olisav57, Yesterday, 07:39 PM
              1 response
              9 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by cocoescala, 10-12-2018, 11:02 PM
              7 responses
              944 views
              0 likes
              Last Post Jquiroz1975  
              Started by oviejo, Today, 12:28 AM
              1 response
              12 views
              0 likes
              Last Post NinjaTrader_Gaby  
              Working...
              X