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

BarType NT8

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

    BarType NT8

    In NT7,

    AddBar(bars, aOpen, aOpen, aOpen, aOpen, time, volume, isRealtime);

    what is the replacement of isRealTime in NT8?

    #2
    Hello,

    Thank you for the question.

    I will need to research this to see if this was replaced or dropped. Once I have further information I will reply back here. This was not in the help guide for NT7 so this has not made it into the code-breaking changes guide.

    If you are not specifically using this property, you may be able to continue without using this in your ongoing syntax, otherwise, you could also review the Daily bars to see how the logic was converted to account for this change. If your logic allows for it, you could use the Daily bars as a starting point or whichever bars type is most similar.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Okay thank you Jesse. Let me know and I hope it won't take long.

      Comment


        #4
        Hello,

        Thank you for the wait.

        I got a response on this item and was asked for some clarification.

        It was noted that State.Realtime could potentially replace the use but we were not certain what specifically you need to do here.

        We removed this complexity on NT8 and it shouldn't matter anymore so it was suggested to remove this use unless there is a specific need for it in your use case. If so, could you provide an NT7 example of the use for me to pass to development?

        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment


          #5
          Thank you for the response, I remove it and now my problem is how to limit the ChartStyle to OpenClose and CandleStick only?

          Comment


            #6
            Hello,

            Thank you for the post.

            I am currently reviewing if this is a possibility. I currently do not see a way to lock the bars type to a range of styles, you can set a default though.

            Once I have further information on this item I will reply back here.

            I look forward to being of further assistance.
            JesseNinjaTrader Customer Service

            Comment


              #7
              In this NT7 it can be done by this code:

              public override ChartStyleType[] ChartStyleTypesSupported
              {
              get
              {
              return new ChartStyleType[] { ChartStyleType.OpenClose, ChartStyleType.CandleStick };
              }
              }

              Comment


                #8
                Hello,

                I just wanted to reply back on this item. It looks like the capability to hide other chart styles is currently removed. There are some internal items that do hide chart styles from the chart like the volumetric bars but this is currently not accessible by other items to do the same. I will need to put in a feature request to expose this type of functionality back into barstypes.

                I look forward to being of further assistance.
                JesseNinjaTrader Customer Service

                Comment


                  #9
                  This may sound irrelevant but I want to ask what is the new way for the graphics.Measure in NT8? In NT7, we have this for example SizeF ef = graphics.MeasureString("String", Font); so I am wondering what is the equivalent of that to NT8?

                  Comment


                    #10
                    Hello,

                    For this, you could see the SampleCustomRender script for the syntax required to measure text.

                    You would need to convert the font used to a TextFormat object and then use that object to construct a TextLayout which could be used for its Metrics.

                    The example starts on line 239 of SampleCustomRender.cs.

                    I look forward to being of further assistance.
                    JesseNinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by BarzTrading, Today, 07:25 AM
                    2 responses
                    13 views
                    1 like
                    Last Post BarzTrading  
                    Started by devatechnologies, 04-14-2024, 02:58 PM
                    3 responses
                    19 views
                    0 likes
                    Last Post NinjaTrader_BrandonH  
                    Started by tkaboris, Today, 08:01 AM
                    0 responses
                    3 views
                    0 likes
                    Last Post tkaboris  
                    Started by EB Worx, 04-04-2023, 02:34 AM
                    7 responses
                    162 views
                    0 likes
                    Last Post VFI26
                    by VFI26
                     
                    Started by Mizzouman1, Today, 07:35 AM
                    1 response
                    9 views
                    0 likes
                    Last Post NinjaTrader_Gaby  
                    Working...
                    X