Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Only show one MessageBox across multiple Indicators

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

    Only show one MessageBox across multiple Indicators

    Hey,

    I have searched the forum for the answer to this question but can't find one exactly like it and have tried a few things without any success. What I'm trying to do is implement some type of pop up message telling the user something. However, if they have the indicator on 10 different charts, it is currently popping up a MessageBox 10 times. I only want 1 popup for that event regardless of how many instances of the indicator they have running. After doing some research, I have found a few possibilities but I'm not sure which route to take.
    • Use an AddOn with a static class. However, I'm not sure of the logic here. If I have a static bool in that class such as IsPopUpShown and set it to true from an indicator, will the value always be correctly in sync when the other indicators check its value?
    • Use an AddOn with a static class but instead of the bool idea, it would just have a static method to show a popup. This method would check all open windows to see if a MessageBox was showing, and would not show it if so.
    • Use some sort of global variable to be True if a popup is shown. Again I'm wondering whether this variable's value can be trusted to be in sync when the other indicators call it.
    • Some other approach? Maybe there's a built in way to do this with MessageBox or the Log() function using the Alert type or something else?
    Thanks a lot!
    Paul

    #2
    Hello Paul,

    Below is a link to an example of opening an addon window from an indicator to present, or gather and return information to the indicator.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    46 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    67 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    35 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    95 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    59 views
    0 likes
    Last Post PaulMohn  
    Working...
    X