Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Can I check if an alert on a line is enabled via NinjaScript

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

    Can I check if an alert on a line is enabled via NinjaScript

    Hi,

    I currently configure alerts on lines with place order action to enter trades via the UI.

    I would like to run a script to check the configuration in case I fat finger something.

    Is there a ninja script lib that would allow me to check Enabled status, and Actions?

    I see AlertConditionItems in the editor but no documentation found (yet)

    for reference, I am currently locating the line like this..

    Code:
    var objLine = DrawObjects.ToList().Where(i => i.Tag == "buy-tag").FirstOrDefault();
    var realLine = (NinjaTrader.NinjaScript.DrawingTools.Line)buyMarker
    Cheers!

    #2
    Hello robforee2,

    Thank you for the post.

    At this time there is currently no documented API for working with alerts from NinjaScript. With that being said I am not aware of a specific way to check if an alert is enabled fora s specific object. I took a look at the properties the object has and the methods to get its alert condition items however I don't see anything for the alert its self or its enabled property.

    The only workaround I can think of, assuming that you wanted to know if a line has an alert enabled, would be to name the line accordingly and check the Tag. If you plan to enable an alert on a line, rename the line to include something specific like adding a letter before the tag like A_ or include something in the name like Has Alert that could be checked for.

    I look forward to being of further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    160 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    307 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    245 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    348 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    178 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Working...
    X