Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to add price labels to @Swing indicator?

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

    How to add price labels to @Swing indicator?

    Hello!

    I have some code examples of how to add price labels in NT7, but I have no idea of how to do that in NT8. I'd like @Swing indicator to look somewhat like the indicator on the attached picture. Please, give me some points of where to look into. Thank you!
    Attached Files

    #2
    Hello quicktrick,


    You can use the PaintPriceMarkers parameter to show price markers for any plots that you have in your script. You could also use the FormatPriceMarker() method to add or change change the text or numbers displayed in your price marker.


    I have included the PaintPriceMarkers and FormatPriceMarker() Help Guides to assist you further.
    Shawn B.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_ShawnB View Post
      You can use the PaintPriceMarkers parameter to show price markers for any plots that you have in your script.
      Hello Shawn,

      Thank you for your reply, but PriceMarkers are not exactly what I want it to be. You can see the difference on the picture I attached to the first post. In NT7 there is `override void Plot()` used to achieve the result. So far I don't know how to do the same in NT8.

      Comment


        #4
        Hello quicktrick,


        Where in NinjaTrader 7 we would use the override void Plot() method.
        In NinjaTrader 8, OnRender() is used in place of this.
        I have included the OnRender() Help Guide to assist you further.
        Shawn B.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by quicktrick View Post
          I have some code examples of how to add price labels in NT7, but I have no idea of how to do that in NT8. I'd like @Swing indicator to look somewhat like the indicator on the attached picture. Please, give me some points of where to look into. Thank you!
          Your probably not going to be able to accomplish what you'd like with the default NT8 swing indy.. What your using now happens to be an old indy I recoded and shared years ago now.. It actually draws rays for the swings (which is why they extend all the way across the screen), and the default swings indy uses plots (which is why they do not)..


          -=Edge=-
          NinjaTrader Ecosystem Vendor - High Tech Trading Analysis

          Comment


            #6
            Originally posted by -=Edge=- View Post
            Your probably not going to be able to accomplish what you'd like with the default NT8 swing indy.. What your using now happens to be an old indy I recoded and shared years ago now.. It actually draws rays for the swings (which is why they extend all the way across the screen), and the default swings indy uses plots (which is why they do not)..


            Hi Edge!

            I understand what you mean. In fact I don't mean to use NT8's @Swing indy, I mentioned it just for example. I do took your old Swing indicator shown in the pictire, but then I completely rewrote its code except the PlotLabels part. Now there is another algorithm and another functionality in my indy. I only want to transfer your PlotLabels methods to NT8.
            Last edited by quicktrick; 10-29-2015, 06:29 AM.

            Comment


              #7
              Originally posted by quicktrick View Post
              Hi Edge! I understand what you mean. I fact I don't mean to use NT8's @Swing indy, I mentioned it just for example. I do took your old Swing indicator shown in the pictire, but then I completely rewrote its code except the PlotLabels part. Now there is another algorithm and another functionality in my indy. I only want to transfer your PlotLabels methods to NT8.
              Post #2 might help get you started..




              -=Edge=-
              NinjaTrader Ecosystem Vendor - High Tech Trading Analysis

              Comment


                #8
                Thank you Edge! I've done almost everything. But there is one thing I can't find in NT8:

                Gui.Globals.GetTickFormatString(TickSize);

                Is there something similar to that in NT8? Can anyone help?

                Comment


                  #9
                  You should now find that under Core.Globals.GetTickFormatString().
                  Dave I.NinjaTrader Product Management

                  Comment


                    #10
                    Originally posted by quicktrick View Post
                    Thank you Edge! I've done almost everything. But there is one thing I can't find in NT8:

                    Gui.Globals.GetTickFormatString(TickSize);

                    Is there something similar to that in NT8? Can anyone help?

                    Try

                    NinjaTrader.Core.Globals


                    -=Edge=-
                    NinjaTrader Ecosystem Vendor - High Tech Trading Analysis

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by aussugardefender, Today, 01:07 AM
                    0 responses
                    3 views
                    0 likes
                    Last Post aussugardefender  
                    Started by pvincent, 06-23-2022, 12:53 PM
                    14 responses
                    238 views
                    0 likes
                    Last Post Nyman
                    by Nyman
                     
                    Started by TraderG23, 12-08-2023, 07:56 AM
                    9 responses
                    384 views
                    1 like
                    Last Post Gavini
                    by Gavini
                     
                    Started by oviejo, Today, 12:28 AM
                    0 responses
                    4 views
                    0 likes
                    Last Post oviejo
                    by oviejo
                     
                    Started by pechtri, 06-22-2023, 02:31 AM
                    10 responses
                    125 views
                    0 likes
                    Last Post Leeroy_Jenkins  
                    Working...
                    X