Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Using PriceLevel in Drawing Tool Property

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

    Using PriceLevel in Drawing Tool Property

    I am using the built-in PriceLevel class in a custom Drawing Tool property
    Code:
    [Display(Name = "Long Measure 1", GroupName = "Measured Move Lines", Order = 82)]
    public PriceLevel LongMeasure1 { get; set; }
    When I open up the Drawing Tool properties it shows the namespace & class name (NinjaTrader.NinjaScript.DrawingTools.PriceLevel) next to the property editor.

    Click image for larger version

Name:	Image.png
Views:	157
Size:	2.5 KB
ID:	1191339

    Is it possible to configure the property so the namespace & class does not show?

    Thanks,
    Greg
    The Trading Mantis
    NinjaTrader Ecosystem Vendor - The Trading Mantis

    #2
    Hello gregschr,

    You would need to structure your class similar to the scripts which utilize PriceLevels type which includes adding the inheritance to the class PriceLevelContainer. For example the Fibonacci retracements is created by inheriting from FibonacciLevels which inherits from PriceLevelContainer or the base type that controls the PriceLevels property. If you look in the file PriceLevels.cs you can find PriceLevelContainer class and inside that class is the property "PriceLevels" which you would be using by inheriting PriceLevelContainer on your custom class.

    If this is a tool that you plan to export as a compiled assembly keep in mind that inheriting from the existing types in the drawing object folder will not work. In that use case you would need to create your own additional classes with custom names and then copy the various code from PriceLevels.cs into those new classes, essentially duplicate and rename where needed. Your script would then inherit from your custom base class (PriceLevelContainer renamed) which contains the price levels to be used with your tool. You would also need to make sure the custom PriceLevel type renamed points to the renamed PriceLevelTypeConverter that you made in the type converter used on that class.


    Comment


      #3
      Hi Jesse, Thanks for the detailed response on how correct this. Also, appreciate the heads up about exporting the compiled assembly!
      The Trading Mantis
      NinjaTrader Ecosystem Vendor - The Trading Mantis

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      558 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      324 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      545 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      547 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X