Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Converting Chart Style Type

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

    Converting Chart Style Type

    Dear support,

    What is the NT8 version for this NT7 line script:

    Code:
     if (ChartControl.ChartStyleType == ChartStyleType.CandleStick)
                  {
                     Do Something
                  }
    References in Help did not help.

    Many thanks

    #2
    Hello aligator,

    From my understanding this was not documented or officially supported for NinjaTrader 7.

    I may incorrect. Do you have a link to the NinjaTrader 7 help guide on ChartControl.ChartStyleType?

    (Only documented items for NT7 will be listed in the code breaking changes for NT8)

    In NinjaTrader 8 this would be documented and supported. This is found in ChartBars.Properties. Below is a public link to the help guide.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_ChelseaB View Post
      Hello aligator,

      From my understanding this was not documented or officially supported for NinjaTrader 7.

      I may incorrect. Do you have a link to the NinjaTrader 7 help guide on ChartControl.ChartStyleType?

      (Only documented items for NT7 will be listed in the code breaking changes for NT8)

      In NinjaTrader 8 this would be documented and supported. This is found in ChartBars.Properties. Below is a public link to the help guide.
      https://ninjatrader.com/support/help...properties.htm
      Thanks Chelsea,

      Unfortunately, the link is not much help to me without any examples, although the ChartStyleType is supported. The above script works in NT7 but not in NT8. I do not have access to NT7 Help.

      All I am looking for is a translation of the above or an equal IF statement for NT8. What is an equal IF statement in NT8 that I can use?

      Thanks.
      Last edited by aligator; 01-07-2019, 12:18 AM.

      Comment


        #4
        Ninja answer here https://ninjatrader.com/support/foru...letype?t=90141

        Hello jbenton,

        Thanks for your post and welcome to the forums!

        Member gubbar924 was close (thank-you), you would want to test using:

        if (ChartBars.Properties.ChartStyleType == ChartStyleType.Box)
        {
        // do something
        }

        Reference: http://ninjatrader.com/support/helpG...us/?charts.htm

        Comment


          #5
          Hello aligator,

          If you have access to the internet you should have access to the NinjaTrader 7 help guide which is available on the internet on our website..



          In fact, it is important that you have access to both the NinjaTrader 7 and NinjaTrader 8 help guides.

          If you are unable to access the NinjaTrader 7 help guide from the link above, please let me know so that we can diagnose.


          May I confirm you are able to access the NinjaTrader 8 help guide linked below as well?
          Chelsea B.NinjaTrader Customer Service

          Comment


            #6
            Hello aligator,

            I am not able to reproduce.

            Attached is a test script.

            Are you able to import the script, open a NinjaScript Output window, and then add the indicator to a chart?
            Does anything appear in the output window?


            I was not able to confirm a previous inquiry. You mentioned you are not able to access the NinjaTrader 7 help guide. Is this still the case?
            Attached Files
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_ChelseaB View Post
              Hello aligator,

              I am not able to reproduce.

              Attached is a test script.

              Are you able to import the script, open a NinjaScript Output window, and then add the indicator to a chart?
              Does anything appear in the output window?


              I was not able to confirm a previous inquiry. You mentioned you are not able to access the NinjaTrader 7 help guide. Is this still the case?
              Thanks ChelseaB,

              This one works fine, Thanks.

              It is funny, I was using exactly the same script after nkhoi posted the example above and it would not compile. Then I deleted the _Workspace file and reopened a new instance of the Ninja Editor and the script compiled perfect.

              I guess somehow a corrupt Editor page with a previously failed script was being saved as part of the _Workspace file.

              Thanks to you and nkhoi for the script.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              601 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              347 views
              1 like
              Last Post Geovanny Suaza  
              Started by Mindset, 02-09-2026, 11:44 AM
              0 responses
              103 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
              0 responses
              559 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              558 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X