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

floating rectangles in the right side of the chart

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

    floating rectangles in the right side of the chart

    Does anyone has a sample indicator or code that can override a drawn rectangles to be always floating in the right side of the chart when the user scroll bar?

    #2
    Hello luxurious_04,

    From my understanding, in NinjaTrader 7 it will not be possible to modify manually drawn objects from a script.

    Are these objects manually drawn, or drawn by the script that will be modifying them?

    I am not aware of any scripts that exist such as this, however, below are a few links to threads about modifying script drawn objects.



    As well as a link to the help guide on the DrawObjects collection.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      A drawn by script and it should stay at the right side of the chart no matter what the user do either scroll up or down.

      Comment


        #4
        Hello luxurious_04,

        Thank you for your note.

        This would require that you add unsupported code to the script.

        By overriding the Plot() method this will trigger when the chart is scrolled. When this occurs, you would need to move the anchor of the existing objects as shown in the linked threads.

        Overriding the Plot() method is not documented/supported by NinjaTrader Support for NinjaTrader 7. Resources were added to NinjaTrader 8 to allow for this in an OnRender() method documented for NinjaScript.

        Below are a few links on overriding the Plot() method.



        This thread will remain open for any community members that would like to assist with this unsupported code.

        You can also contact a professional NinjaScript Consultant who would be eager to create or modify this script at your request or assist you with your script. The NinjaTrader Ecosystem has affiliate contacts who provide educational as well as consulting services. Please let me know if you would like our business development follow up with you with a list of affiliate consultants who would be happy to create this script or any others at your request.
        Last edited by NinjaTrader_ChelseaB; 01-30-2017, 08:50 AM.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Thanks for the info..Now how can I plot a string value? Or a string series? I want to plot the string value in every bar just like plotting an integer value by bar.

          Comment


            #6
            Hello luxurious_04,

            To draw text above or below a bar use DrawText().
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              I am not trying to draw on the chart. I am asking how to plot string values on the chart just like this stringSeries.Set("UpBar"); and I can access that using this Value[0]? Just like plotting a double or int values in each bar. Just like ATR.Set(5.023) then I can access that by this code Value[0] or ATR[0].

              Comment


                #8
                Hello luxurious_04,

                Thank you for your response.

                The Plots require a double value. So what you could do is create a string series and then pass it's values to the Draw.Text(). You can then expose the string series so you could call it from another script.

                For information on Series in NinjaTrader 8 please visit the following link: http://ninjatrader.com/support/helpG...us/seriest.htm

                For an example on exposing a Series please visit the following link: http://ninjatrader.com/support/forum...ead.php?t=4991

                Please let me know if you have any questions.

                Comment


                  #9
                  I tried using a string series but I don't have a value in the override plot section. mySeries[0] returns a null value but in the OnBarUpdate it does have a value.

                  Comment


                    #10
                    Hello luxurious_04,

                    Thank you for your response.

                    That would be correct. A series of String is not a Plot. To clarify this further; you cannot set a string as a plot.

                    Comment


                      #11
                      then what would be the best way on this?

                      Comment


                        #12
                        Hello luxurious_04,

                        Thank you for your response.

                        The method I described in post #8 would be the best solution here: http://ninjatrader.com/support/forum...56&postcount=8

                        You can access the values of the Series from other NS objects once it is exposed. All you have to do is use Draw.Text() to draw the strings on the chart fro the String Series where you stored the strings.

                        Please let me know if you have any questions.

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by bmartz, 03-12-2024, 06:12 AM
                        5 responses
                        32 views
                        0 likes
                        Last Post NinjaTrader_Zachary  
                        Started by Aviram Y, Today, 05:29 AM
                        4 responses
                        12 views
                        0 likes
                        Last Post Aviram Y  
                        Started by algospoke, 04-17-2024, 06:40 PM
                        3 responses
                        28 views
                        0 likes
                        Last Post NinjaTrader_Jesse  
                        Started by gentlebenthebear, Today, 01:30 AM
                        1 response
                        8 views
                        0 likes
                        Last Post NinjaTrader_Jesse  
                        Started by cls71, Today, 04:45 AM
                        1 response
                        7 views
                        0 likes
                        Last Post NinjaTrader_ChelseaB  
                        Working...
                        X