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

newb question: developing a scanner

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

    newb question: developing a scanner

    Hi all,

    I'm an experienced software developer (and less experienced trader) and want to use Ninjascript to write software to track a couple of hundred stocks during the trading day, reporting stats on them via a .net program that I write.

    I downloaded it, got it hooked up to quotes (TDAmeritrade) but I'm having a conceptual problem.

    It looks like its geared around having a chart and a specific symbol, I see how you create a chart, assign it to a symbol and then write strategies that attach to that chart.

    however, I want to write code that just calls the equivalent of GetQuote(symbol) once every few seconds for a bunch of stocks and accrue stats.

    I don't actually want to live trade, just get quotes.

    What is the mechanism for this? Can I attach to ninjatrader as a DLL? Are there examples?

    thanks in advance,

    john

    #2
    Hello John,
    Thanks for your post.

    You can use the Market Analyzer to run a script on a group of instrument. Please refer to this help file for further reference http://www.ninjatrader.com/support/h...th_columns.htm

    You can do what you are looking for, for example please have a look at this thread, http://www.ninjatrader.com/support/f...t=excel&page=2, where the user have linked excel with ninjatrader.

    Please let me know if I can assist you any further.
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      developing custom indicators in Market Analyzer

      Thank you for your reply, the Market Analyzer is about 90% of what I'm looking for if I can have the ability to have a column display a value that comes from code that I write.

      For instance, I want to know how long a current price is 'inside' a previous candle on some time frame, so I need to have some code that gets activated with ticks, maintain data structures that record the high and low in a price range and then compare each tick to that, displaying the results. I can write this if its possible to have it available as a column.

      Does the market analyzer allow use of custom indicators in this way?

      thanks,

      john

      Comment


        #4
        Hello John,
        Unfortunately this is beyond what we could support, but you can have a look at the <Documents>\NinjaTrader 7\bin\Custom\MarketAnalyzer\ folder.
        JoydeepNinjaTrader Customer Service

        Comment


          #5
          thanks, I don't seem to have that folder.

          However, stepping back a level, if I were to ask if I could write just a console level program to do this could I do it?

          // connect to server
          connect("user","password");

          // get last trade for symbols
          for (i=0; i < 100; i++) {
          decimal lastval = GetQuote(symbolList[i]);
          // do something with that
          processvalue(symbolList[i],lastval);
          }

          Comment


            #6
            Hello John,
            It’s a default folder of NinjaTrader which resides in My Documents.

            Alternatively, you could code an indicator. Market Analyzer can also display the plot values of any indicator as well.

            Please let me know if I can assist you any further.
            JoydeepNinjaTrader Customer Service

            Comment


              #7
              Originally posted by jkmott59 View Post
              Thank you for your reply, the Market Analyzer is about 90% of what I'm looking for if I can have the ability to have a column display a value that comes from code that I write.

              For instance, I want to know how long a current price is 'inside' a previous candle on some time frame, so I need to have some code that gets activated with ticks, maintain data structures that record the high and low in a price range and then compare each tick to that, displaying the results. I can write this if its possible to have it available as a column.

              Does the market analyzer allow use of custom indicators in this way?

              thanks,

              john
              You may be making it a bit more complex than it need be.

              You just need to expose a value or Plot and key off it in the Market Analyzer. This old post of mine might illustrate what I mean. http://www.ninjatrader.com/support/f...d.php?p=265943
              Last edited by koganam; 01-24-2012, 03:47 PM.

              Comment


                #8
                oh, if I can write an indicator and plot that value its perfect. I'll work towards that, thanks!

                Comment


                  #9
                  Hello John,
                  Glad you could figure it out.

                  @thanks koganam for your input.
                  JoydeepNinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by andrewtrades, Today, 04:57 PM
                  1 response
                  5 views
                  0 likes
                  Last Post NinjaTrader_Manfred  
                  Started by chbruno, Today, 04:10 PM
                  0 responses
                  3 views
                  0 likes
                  Last Post chbruno
                  by chbruno
                   
                  Started by josh18955, 03-25-2023, 11:16 AM
                  6 responses
                  436 views
                  0 likes
                  Last Post Delerium  
                  Started by FAQtrader, Today, 03:35 PM
                  0 responses
                  7 views
                  0 likes
                  Last Post FAQtrader  
                  Started by rocketman7, Today, 09:41 AM
                  5 responses
                  19 views
                  0 likes
                  Last Post NinjaTrader_Jesse  
                  Working...
                  X