Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Price Marker when using OnRender

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

    Price Marker when using OnRender

    I am using OnRender to draw a custom rectangle. How do you Paint a Price Marker in the price scale at a given price using OnRender? I have set PaintPriceMarkers = true inside of OnStateChange but I don't think that does anything when you are drawing custom shapes.

    #2
    Helo swcooke,

    Thank you for your note.

    I've put together an example which will render text on the chart at a Y value of the last price and a x value of 100 bars back. You could use this as a reference example for getting X/Y points on the chart.

    Please see the following two links,



    Please let us know if you need further assistance.
    Attached Files
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      The example doesn't seem to add anything to the chart. Here is a screenshot:
      World's leading screen capture + recorder from Snagit + Screencast by Techsmith. Capture, edit and share professional-quality content seamlessly.

      Comment


        #4
        Hello swcooke,

        If you open a daily chart of an instrument and apply the indicator, it should be overlayed over the chart. You should also find the text, 100 bars over from the left most bar.

        On a new chart, 100 over from the left do you see the text?

        I look forward to your reply.
        Alan P.NinjaTrader Customer Service

        Comment


          #5
          Hi Alan,

          Thanks for the reply. Is there an API to draw markers that look like the built in markers? I was searching the Doc's for some way to add a function that would DrawMarker(price,backColor,textColor) or something like that. Are you suggesting I just draw a square, triangle and text using SharpDX and position them and use that? I guess I was thinking there might be a more built in way of doing this so it matches the markers NT already uses.

          Comment


            #6
            Hello swcooke,

            Yes, in OnRender the supported method would be to use SharpDX to draw the object.

            Please let us know if you need further assistance.
            Alan P.NinjaTrader Customer Service

            Comment


              #7
              did you ever find a solution to this? I understand how to draw custom shapes with OnRender, but it gets covered by the price axis.

              Comment


                #8
                I see this is a feature request here: https://ninjatrader.com/support/foru...+marker&page=2

                Please add me to the vote. The plot solution isn't a good one.

                Comment


                  #9
                  Hello HandsFreeTrader,

                  This request has been assigned the internal tracking id of SFT-3373.

                  Please let me know if you have any questions.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                  0 responses
                  571 views
                  0 likes
                  Last Post Geovanny Suaza  
                  Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                  0 responses
                  331 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by Mindset, 02-09-2026, 11:44 AM
                  0 responses
                  101 views
                  0 likes
                  Last Post Mindset
                  by Mindset
                   
                  Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                  0 responses
                  549 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by RFrosty, 01-28-2026, 06:49 PM
                  0 responses
                  550 views
                  1 like
                  Last Post RFrosty
                  by RFrosty
                   
                  Working...
                  X