Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Formatting Native Drawing Tols

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

    Formatting Native Drawing Tols

    Hi,

    Is there any documentation on coding custom drawing tools? I have a native tool which draws an object. I have been able to attach a price to it. What I would like to do is:

    1. Add a name tag with a colored background box around it. Currently the price sits below the object. I would also like to add a name tag above the object but I can't find any documentation on the positioning. Is it part of TextLayout?

    2. Have an option to place a colored box background around either the price, and/or the name tag. The idea is similar to how the colors are set for Region Highlight Y, with outline color spec and a Color Area spec.

    Any suggestions would be welcome and appreciated. Thank you.

    #2
    Hello Zeos6,

    Thank you for your post.

    There is no tutorial on creating the Drawing Tools but the currently existing Drawing Tools in the NinjaScript Editor can server as guides to building what you need.

    1. That is correct. You would use TextLayout and RenderTarget.DrawTextLayout: https://ninjatrader.com/support/help...textlayout.htm
    2. You can use RectangleF and RenterTarget.FillRectangle for this purpose: https://ninjatrader.com/support/help...lrectangle.htm

    Please let me know if you have any questions.

    Comment


      #3
      Thanks Patrick. I will check it out.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by algospoke, Yesterday, 06:40 PM
      2 responses
      23 views
      0 likes
      Last Post algospoke  
      Started by ghoul, Today, 06:02 PM
      3 responses
      15 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by jeronymite, 04-12-2024, 04:26 PM
      3 responses
      46 views
      0 likes
      Last Post jeronymite  
      Started by Barry Milan, Yesterday, 10:35 PM
      7 responses
      23 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by AttiM, 02-14-2024, 05:20 PM
      10 responses
      181 views
      0 likes
      Last Post jeronymite  
      Working...
      X