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

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:
      Free online storage and sharing with Screencast.com. 2 GB of storage and 2 GB of bandwidth per month for free. We won't compress, alter or take ownership of your content.

      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 CortexZenUSA, Today, 12:53 AM
                  0 responses
                  1 view
                  0 likes
                  Last Post CortexZenUSA  
                  Started by CortexZenUSA, Today, 12:46 AM
                  0 responses
                  1 view
                  0 likes
                  Last Post CortexZenUSA  
                  Started by usazencortex, Today, 12:43 AM
                  0 responses
                  5 views
                  0 likes
                  Last Post usazencortex  
                  Started by sidlercom80, 10-28-2023, 08:49 AM
                  168 responses
                  2,266 views
                  0 likes
                  Last Post sidlercom80  
                  Started by Barry Milan, Yesterday, 10:35 PM
                  3 responses
                  13 views
                  0 likes
                  Last Post NinjaTrader_Manfred  
                  Working...
                  X