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

Custom Zone Drawing tool using rectangle to draw around candles

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

    Custom Zone Drawing tool using rectangle to draw around candles

    I am looking for a custom drawing tool for NT8 like the mocked up image in this post. It is a drawing tool for price zones. I want to use the rectangle to draw a box around a candle formation.
    • If there is an existing tool like this please point me to it.
    • I have a coding background in other languages and I could probably figure this out if I try hard enough.... and it might take too much time to learn.
    • I am open to someone doing this for me if inclined or to do it together if you are willing to help.

    Here is the description/requirements as I imagine it:
    • use rectangle and draw box around a candle formation.
    • The Rectangle would automatically have a Horizontal Region Y attached to the right side of the rectangle. - the horizontal region left origin edge is directly attached to the the rectangle's right edge. The horizontal region would extend to the right indefinitely.
    • the colors would be configurable, but default to green if below current price and red if above current price at the time it is created. the combined zone would be transparent similar to the Horizontal Region Y.
    • the drawings become a pair such that adjustments to one would be updated to the other.
      • the yellow rectangle area is adjustable and draggable just like the NT8 rectangle. Changes to the rectangle are updated on the Horizontal Region. Adjustments to the width or position of the yellow rectangle would only need to be done on the rectangle.
      • adjustments to the height of the combined zone drawing could be executed anywhere on the top border or bottom border of the rectangle or the horizontal zone.
      • right click on the drawing object in a chart would access the normal drawing object menu.
    • wish list:
      • if price action enters the zone to a configurable percentage (default 50%) then the color of the zone could change to show that it had been breeched.
      • the zone could be configured for alerts.

    Last edited by xiinteractive; 02-04-2022, 11:46 AM. Reason: added tags

    #2
    Hi, thanks for posting.

    I'm not aware of an existing tool, but this thread will remain open indefinitely for members of the forum to provide suggestions. If you would try developing it yourself, all of the drawing tools in the platform by default are open source and available to study through New>Ninjascript Editor>Drawing Tools.

    Kind regards,
    -ChrisL
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Would it be easier to make a custom Rectangle that allowed its right side to be unbound.. so to extend infinitely to the right? And this way it would not require adding on the Horizontal Region Y ?

      Comment


        #4
        Hi xiinteractive, thanks for the follow up.

        An Indicator would be able to draw a Region Y and a Rectangle, but making a custom drawing tool would provide the maximum flexibility, but development would require more knowledge of SharpDX programming in OnRender.

        Kind regards,
        -ChrisL
        Chris L.NinjaTrader Customer Service

        Comment


          #5
          hmm... Ninjatrader should consider replacing that tech in the stack because SharpDX is open source and its dead now. It hasn't had any active development for 3 years. The github repo is now read-only .. no changes or updates allowed.
          SharpDX GitHub Repository. Contribute to sharpdx/SharpDX development by creating an account on GitHub.

          Comment


            #6
            Hi, thanks for your reply.

            The development team is aware of the SharpDX development status. It is a wrapper for the C++ DirectX library and is used by many projects. As long as the platform the application using SharpDX runs using .NET 4.0, .NET 4.5+, or .NET Core it is OK to continue using SharpDX.

            Best regards,
            -ChrisL
            Chris L.NinjaTrader Customer Service

            Comment


              #7
              so I figured out a temporary way to make the rectangle kind of do part of what I want... simply set the rectangle properties END TIME to something way off in the distant future.

              Next question, is there a way to set the rectangle END TIME to a blank so that it extends, without me typing it in?

              Comment


                #8
                Hi, thanks for your reply.

                The default Rectangle object will need an end time to work. Anything different would need to be custom made through your own drawing tool.

                Best regards,
                -ChrisL
                Chris L.NinjaTrader Customer Service

                Comment


                  #9
                  if I draw rectangles such as these (extending off the screen to the right) on my chart, and I make them global so they are shared across workspaces.
                  • where are they (the data of the rectangles) stored? (are they stored separate from a workspace?)
                  • how many can be displayed on a chart before it impacts performance?

                  Comment


                    #10
                    Hello xiinteractive,

                    The objects are stored in the workspace when you save it.

                    You can display many objects with minimal performance impact. If you have a very high number of objects being rendered that can affect performance so in that use case it may be suggested to use custom rendering instead of drawing objects if you feel performance is being impacted.
                    JesseNinjaTrader Customer Service

                    Comment


                      #11
                      Would you mind sharing the code you've gotten so far for this. I'm trying to build something else with shapes on the chart and could use somewhere to get started. Ideally the shapes would go on the times and sales or DOM but... we'll see

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by DJ888, 04-16-2024, 06:09 PM
                      4 responses
                      11 views
                      0 likes
                      Last Post DJ888
                      by DJ888
                       
                      Started by terofs, Today, 04:18 PM
                      0 responses
                      5 views
                      0 likes
                      Last Post terofs
                      by terofs
                       
                      Started by nandhumca, Today, 03:41 PM
                      0 responses
                      5 views
                      0 likes
                      Last Post nandhumca  
                      Started by The_Sec, Today, 03:37 PM
                      0 responses
                      3 views
                      0 likes
                      Last Post The_Sec
                      by The_Sec
                       
                      Started by GwFutures1988, Today, 02:48 PM
                      1 response
                      9 views
                      0 likes
                      Last Post NinjaTrader_Clayton  
                      Working...
                      X