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

Waiting while loading message

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

    Waiting while loading message

    Hello,

    I would like to add a message shown on the screen while my indicator is loading data.

    How can I do that ?

    Probably inside the initialize method


    Many thanks !

    #2
    You can use OnStartUp() to display messages as soon as the indicator is started

    I guess I'm not quite sure how you want this to be handled, but one apporach would be to use the System.Windows.Forms.MessageBox on startup

    Code:
    		protected override void OnStartUp()
    		{
    			System.Windows.Forms.MessageBox.Show("Please wait while the indicator calculates");		
    		
    		}
    MatthewNinjaTrader Product Management

    Comment


      #3
      Matthew

      When I do that , I have to click on OK button and the indicator just show nothing

      Comment


        #4
        Hi,

        How would you like it to work?

        My suggestion will simply display a message box that instructs to a client that the indicator may load. If this is more than you wanted, you can always use a DrawTextFixed object in OnStartUp as well.

        Are you looking for something to happen such as the message to go away at the moment the indicator loaded?

        To check when the indicator has finished loading, you can always compare CurrentBar to Count

        Code:
                    if(CurrentBar == Count - 2)
        			{
        				// do something				
        			}
        MatthewNinjaTrader Product Management

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Irukandji, Today, 04:58 AM
        0 responses
        2 views
        0 likes
        Last Post Irukandji  
        Started by fitspressoburnfat, Today, 04:25 AM
        0 responses
        2 views
        0 likes
        Last Post fitspressoburnfat  
        Started by Skifree, Today, 03:41 AM
        1 response
        4 views
        0 likes
        Last Post Skifree
        by Skifree
         
        Started by usazencort, Today, 01:16 AM
        0 responses
        1 view
        0 likes
        Last Post usazencort  
        Started by kaywai, 09-01-2023, 08:44 PM
        5 responses
        604 views
        0 likes
        Last Post NinjaTrader_Jason  
        Working...
        X