Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Correlation indicator in Market Analyzer

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

    #16
    Correct 100 is the length and I have changed the code to if (CurrentBars[0] <= Length || CurrentBars[1] <= Length) and set the indicator to infinite, but that does not work.

    Comment


      #17
      Hi tinkerz,

      Can I test your script on my end to see what is going on?

      To export your script do the following:
      1. Click File -> Utilities -> Export NinjaScript
      2. Enter a unique name for the file in the value for 'File name:'
      3. Select the strategy from the objects list on the left -> click the right facing arrow ">" to add the strategy to the export
      4. Click the 'Export' button -> click 'yes' to add any referenced indicators to the export -> click OK to clear the export location message


      By default your exported file will be in the following location:
      • (My) Documents/NinjaTrader 7/bin/Custom/ExportNinjaScript/<export_file_name.zip>


      Below is a link to the help guide on Exporting NinjaScripts.
      http://www.ninjatrader.com/support/h...nt7/export.htm

      (If you would like to keep the script private please let me know)
      Chelsea B.NinjaTrader Customer Service

      Comment


        #18
        No problem, here is my file
        Attached Files

        Comment


          #19
          Hi tinkerz,

          I added prints to your code, added the current bar check for both, set my chart to load 50 bars and I get no prints.

          How, many bars are you loading in the Market Analyzer window?
          Chelsea B.NinjaTrader Customer Service

          Comment


            #20
            number of bars to look back is 100
            maximum bars look back is infinite

            Comment


              #21
              Hi tinkerz,

              I've increased my bars to load on the chart to 100 and I am still not getting prints.

              I'm pretty sure this is the issue. Try setting the bars to load in the Market Analyzer to 300 and see if any of your prints come out. (They are on mine)
              Chelsea B.NinjaTrader Customer Service

              Comment


                #22
                Yes 300 works, I can now test the results against the chart results.

                Thanks.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by argusthome, 03-08-2026, 10:06 AM
                0 responses
                71 views
                0 likes
                Last Post argusthome  
                Started by NabilKhattabi, 03-06-2026, 11:18 AM
                0 responses
                43 views
                0 likes
                Last Post NabilKhattabi  
                Started by Deep42, 03-06-2026, 12:28 AM
                0 responses
                25 views
                0 likes
                Last Post Deep42
                by Deep42
                 
                Started by TheRealMorford, 03-05-2026, 06:15 PM
                0 responses
                28 views
                0 likes
                Last Post TheRealMorford  
                Started by Mindset, 02-28-2026, 06:16 AM
                0 responses
                56 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Working...
                X