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 Christopher_R, Today, 12:29 AM
                  0 responses
                  9 views
                  0 likes
                  Last Post Christopher_R  
                  Started by sidlercom80, 10-28-2023, 08:49 AM
                  166 responses
                  2,235 views
                  0 likes
                  Last Post sidlercom80  
                  Started by thread, Yesterday, 11:58 PM
                  0 responses
                  3 views
                  0 likes
                  Last Post thread
                  by thread
                   
                  Started by jclose, Yesterday, 09:37 PM
                  0 responses
                  8 views
                  0 likes
                  Last Post jclose
                  by jclose
                   
                  Started by WeyldFalcon, 08-07-2020, 06:13 AM
                  10 responses
                  1,415 views
                  0 likes
                  Last Post Traderontheroad  
                  Working...
                  X