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

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
    Paul H.NinjaTrader Customer Service

    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).
        Paul H.NinjaTrader Customer Service

        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.
            Paul H.NinjaTrader Customer Service

            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.
                  Paul H.NinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by gemify, 11-11-2022, 11:52 AM
                  6 responses
                  803 views
                  2 likes
                  Last Post ultls
                  by ultls
                   
                  Started by ScottWalsh, Today, 04:52 PM
                  0 responses
                  3 views
                  0 likes
                  Last Post ScottWalsh  
                  Started by ScottWalsh, Today, 04:29 PM
                  0 responses
                  7 views
                  0 likes
                  Last Post ScottWalsh  
                  Started by rtwave, 04-12-2024, 09:30 AM
                  2 responses
                  22 views
                  0 likes
                  Last Post rtwave
                  by rtwave
                   
                  Started by tsantospinto, 04-12-2024, 07:04 PM
                  5 responses
                  70 views
                  0 likes
                  Last Post tsantospinto  
                  Working...
                  X