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

Onmarketdata() Reference Sample

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

    Onmarketdata() Reference Sample

    I have compiled the onmarketdata() reference sample into a new skeleton of an indicator.
    It is not printing to the output window.
    Is there something I am missing about placement of the method in the overal script structure (i.e. before or after the onbarupdate() method etc.)

    Thanks!

    #2
    mgabriel01, are you checking on Market Replay or Realtime data here? The OnMarketData() would not fire on historical data.

    Thanks,
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Bertrand,
      Yes, I am running it through Market Replay - so I understand your response
      Thanks

      One more question on this.
      The Time & Sales user interface does show the data, so the data elements are captured in the Market replay.

      I understood the onmarketupdate() method to use the same internal interface as Time & Sales, so I'm curious why the onmarketupdate() method does not have access to the data

      Thanks for your help!

      Comment


        #4
        Correct, the Time and Sales windows works off Level 1 data as well, comparable to the OnMarketDate().

        Are there any errors in the log tab as you run your script?

        Does the original reference where you copied the code from run well and as expected?
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Attached is the script
          I'm probably just doing something ignorant
          Attached Files

          Comment


            #6
            Thanks, no the file works fine for me here.

            What symbol, chart and timeframe are you exactly running here to test?

            Do you have any historical data as well loaded on the chart you run this indicator from?
            BertrandNinjaTrader Customer Service

            Comment


              #7
              ES 12/11 5 minute chart
              I have historical data turned on in the defaults for my zenfire feed - but I am using the indicator on the live feed

              The output window does not open up

              Comment


                #8
                mgabriel,

                I am happy to assist you.

                When you go to Tools > Output Window the output window is not appearing? Or the method is still not printing to the Output Window?

                I look forward to assisting you.
                Adam P.NinjaTrader Customer Service

                Comment


                  #9
                  Adam
                  The output window would not open up at all
                  But I just updated my NT 7 to 7.0.1000.7 ---
                  and voila
                  It works!
                  Thank you sir

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by CortexZenUSA, Today, 12:53 AM
                  0 responses
                  1 view
                  0 likes
                  Last Post CortexZenUSA  
                  Started by CortexZenUSA, Today, 12:46 AM
                  0 responses
                  1 view
                  0 likes
                  Last Post CortexZenUSA  
                  Started by usazencortex, Today, 12:43 AM
                  0 responses
                  5 views
                  0 likes
                  Last Post usazencortex  
                  Started by sidlercom80, 10-28-2023, 08:49 AM
                  168 responses
                  2,266 views
                  0 likes
                  Last Post sidlercom80  
                  Started by Barry Milan, Yesterday, 10:35 PM
                  3 responses
                  13 views
                  0 likes
                  Last Post NinjaTrader_Manfred  
                  Working...
                  X