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

Feature request - Add options to Draw. functions

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

    Feature request - Add options to Draw. functions

    many flexible things could be added to Draw. functions, like:

    1) to have z-index (i.e. https://ninjatrader.com/support/help..._rectangle.htm ): so the draw should happen behind bar or in front of bar (not it is in front of bar and hides the bar. we cant set it to be in the back of the bar).



    2) Draw.Arrow/ Dot ...etc... to have "Size" option.

    and other simple things will be nice! otherwise we have to use extensive coding on "OnRender" With Sharpdx and hard things...

    #2
    Hello TazoTodua,

    Thanks for your post.

    What you are requesting can currently be done although it may not be as convenient as perhaps you are wanting. Please review the options presented below and let me know if you still want to have us enter a feature request as you have stated.

    You can manually control the z-order to manipulate the layering of objects as you wish, as you might suspect everyone wants it done differently (order wise) so this control allows anyone (don't need to be a programmer) to layer the draw objects as needed. Please see " How to change the z-order (paint order) of a chart object" in: https://ninjatrader.com/support/help...rt_objects.htm

    From a programming point of view you can control the individual elements as you wish. With reference to: https://ninjatrader.com/support/help...us/?charts.htm even though this is in the "OnRender" section, you can still apply to Draw methods as they do use OnRender. For example (and see screenshot):

    Dot myDot = Draw.Dot( this, "test"+CurrentBar, true, 2, Middle[2], Brushes.Fuchsia);
    myDot.IsSeparateZOrder = true;
    myDot.ZOrder = -10000; // draw behind bars

    TriangleUp myUpt = Draw.TriangleUp( this, "test1"+CurrentBar, true, 1, Middle[1], Brushes.Blue);
    myUpt.IsSeparateZOrder = true;
    myUpt.ZOrder = -10001; // draw behind the Dot


    Reference: https://ninjatrader.com/support/help...ratezorder.htm

    The Draw arrow/Dot size question can be addressed in another alternative or two that can be done today:
    1) Use a plot instead, where you can change the size as needed. this is a limited approach but is easily implemented, you can set the plotstyle to Block, Cross, Dot, Square, Triangles left, right, up down.
    2) Use Draw.Text(), select a drawing font such as wingdings, you can find all sorts of things to draw and can easily change the font size.
    Attached Files
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      excellent answer as alwyas!

      btw, yes about arrows, it could have been just good if there was size option.
      creating font (initlialization fo SImpeFont or etc.. or creating additional plots) are not as conveninet, as just easily rememeberable one-line function.

      Comment


        #4
        Hello TazoTodua,

        Thanks for your reply.

        I will submit a feature request to allow for size specification in the Draw. statements.

        I will update this thread when I have the SFT number.
        Paul H.NinjaTrader Customer Service

        Comment


          #5
          Hello TazoTodua,

          Your vote has been added to the existing feature request identified as:

          SFT-2175, "Ability to adjust the size of drawing objects such as arrows, dots, triangles, etc".

          Thanks for your interest to improve NinjaTrader8.
          Paul H.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by bortz, 11-06-2023, 08:04 AM
          47 responses
          1,603 views
          0 likes
          Last Post aligator  
          Started by jaybedreamin, Today, 05:56 PM
          0 responses
          8 views
          0 likes
          Last Post jaybedreamin  
          Started by DJ888, 04-16-2024, 06:09 PM
          6 responses
          18 views
          0 likes
          Last Post DJ888
          by DJ888
           
          Started by Jon17, Today, 04:33 PM
          0 responses
          4 views
          0 likes
          Last Post Jon17
          by Jon17
           
          Started by Javierw.ok, Today, 04:12 PM
          0 responses
          12 views
          0 likes
          Last Post Javierw.ok  
          Working...
          X