Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Why do indicators created in stategy not show on chart?

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

    Why do indicators created in stategy not show on chart?

    The converted code from 7 does not work. The version 8's sample code does not work either. Anything went wrong? Thanks!

    #2
    Hello atrader,

    Thanks for your post.

    If you want to have a strategy display an indicator on the chart, you would need to use the AddChartIndicator() method. Reference: http://ninjatrader.com/support/helpG...tindicator.htm

    Comment


      #3
      Thank you Paul! As I mentioned earlier, your sample code does not work either and AddChartIndicator() is used too. I never have this kind of issue in Version 7. To make it simple, how can I make your sample works? Thanks!

      Comment


        #4
        Hello atrader,

        Thanks for your reply.

        In order to assist further, please provide some specifics of what "sample" is not working for you. Do you see any error messages listed in the "log" tab of the control center related to the "sample"?

        Also, please identify what specific version of NinjaTrader8 you are using (found in Help>About).

        Comment


          #5
          The sample is "SampleMACrossOver". There is no any information in the log. And I am using version 8.0.5.0 64-bit (Standard). Thanks!

          Comment


            #6
            Hello atrader,

            Thanks for your post.

            Please send your log and trace files into PlatformSupport[at]NinjaTrader[dot]Com. Mark the e-mail Atten:Paul and a link to this thread.

            Please follow the steps below to manually attach your log and trace files to your e-mail so I may investigate this matter further.

            Open your NinjaTrader folder under Documents.
            Right click on the 'log' and 'trace' folders and select Send To> Compressed (zipped) Folder.
            Send the 2 compressed folders as attachments to this email.
            Once complete, you can delete these compressed folders.

            Comment


              #7
              I find out the reason. There is an Enabled choice in the initial setup which does not exist in version 7. I just activated it, and it started working.

              Comment


                #8
                Discrepancy in documentation for: AddChartIndicator

                Online doc for AddChartIndicator states:

                Warning: This method should ONLY be called from the OnStateChange() method during State.DataLoaded

                however this generates an error in the log:

                'OnStateChange' method: 'AddChartIndicator' cannot be called from this state. Please see the Help Guide article on 'AddChartIndicator' for more information.


                If AddChartIndicator is called in State.Configure -- no error is logged.

                Please update your docs or fix the implementation.

                Thank you

                Comment


                  #9
                  Hello EquityBoost2,

                  Thanks for your post and welcome to the forums.

                  What specific version of NinjaTrader 8 are you using? (Look in Help>About)

                  Can you provide a sample strategy that demonstrates the issue.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by NullPointStrategies, Yesterday, 05:17 AM
                  0 responses
                  56 views
                  0 likes
                  Last Post NullPointStrategies  
                  Started by argusthome, 03-08-2026, 10:06 AM
                  0 responses
                  133 views
                  0 likes
                  Last Post argusthome  
                  Started by NabilKhattabi, 03-06-2026, 11:18 AM
                  0 responses
                  73 views
                  0 likes
                  Last Post NabilKhattabi  
                  Started by Deep42, 03-06-2026, 12:28 AM
                  0 responses
                  45 views
                  0 likes
                  Last Post Deep42
                  by Deep42
                   
                  Started by TheRealMorford, 03-05-2026, 06:15 PM
                  0 responses
                  49 views
                  0 likes
                  Last Post TheRealMorford  
                  Working...
                  X