Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 TheWhiteDragon, 01-21-2019, 12:44 PM
    5 responses
    551 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by rtwave, 04-12-2024, 09:30 AM
    5 responses
    37 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by funk10101, Today, 12:02 AM
    1 response
    11 views
    0 likes
    Last Post NinjaTrader_LuisH  
    Started by GLFX005, Today, 03:23 AM
    1 response
    6 views
    0 likes
    Last Post NinjaTrader_Erick  
    Started by nandhumca, Yesterday, 03:41 PM
    1 response
    13 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Working...
    X