Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Show / Hide Price Markers / Labels in Drawing Tool Script

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

    Show / Hide Price Markers / Labels in Drawing Tool Script

    Dear Support


    Is there within Ninja Script the ability to set the Show/Hide Properties for Price Markers (labels) in a Drawing Tools Script?


    If so, can this be applied to all lines for instance via OnStateChange() or better still for a specific lines like in a Fib or multi-line tool?

    - PriceLevels.Add(new PriceLevel(50, Brushes.Green,1,DashStyleHelper.Dash,50)); // ... and now set whether to show / hide price/text for this line.


    In addition, it there a way to add a specific text comment to a line?
    - PriceLevels.Add(new PriceLevel(50, Brushes.Green,1,DashStyleHelper.Dash,50)); // ... Text "50" or "0.5" or "Something Else"


    And specify it's location?
    - Inside Left, Extreme Left, Inside Right, Extreme Extreme Right, Do Not Show, Above Right, Below Right etc.


    All from within the script an not an external template.


    Any help especially example code specific to this greatly appreciated.​


    Thank you.​
    Last edited by SIERRA_HOTEL; 02-27-2025, 05:26 AM.

    #2
    Hello SIERRA_HOTEL,

    Welcome to the NinjaTrader forums!

    Unfortunately, drawing tools do not have the ability to add price markers to the price scale the way that indicator plots do. This is something specific to indicator plots.

    You can custom render text as a marker in the chart area to the left of the price scale in OnRender().
    Join the official NinjaScript Developer Community for comprehensive resources, documentation, and community support. Build custom indicators and automated strategies for the NinjaTrader platforms with our extensive guides and APIs.

    Join the official NinjaScript Developer Community for comprehensive resources, documentation, and community support. Build custom indicators and automated strategies for the NinjaTrader platforms with our extensive guides and APIs.


    Below is a link to a User App Share drawing tool script that renders text.
    This is an expansion of the the NinjaTrader Lines Drawing Tool(s) that adds text boxes to each line that will show prices associated with the endpoint or where the line crosses the price scale. Vertical lines will show time stamps. Your own messages can be added to each text box. New settings can be set […]


    You can loop through the PriceLevels of a drawing tool.
    Join the official NinjaScript Developer Community for comprehensive resources, documentation, and community support. Build custom indicators and automated strategies for the NinjaTrader platforms with our extensive guides and APIs.


    Your conditions appear to be possible, but you would need to write all of the logic and calculations to accomplish this.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    553 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
    100 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    543 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    546 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X