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 CaptainJack, 05-29-2026, 05:09 AM
    0 responses
    163 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 05-29-2026, 12:02 AM
    0 responses
    82 views
    0 likes
    Last Post CaptainJack  
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    125 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    206 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    185 views
    0 likes
    Last Post CarlTrading  
    Working...
    X