Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Is OnStartUp called?

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

    Is OnStartUp called?

    Is the OnStartUp method called for an indicator that is loaded in the MarketAnalyzer?
    If so, would it be called every time the user refreshes the window (F5)?

    Thanks,
    Gary

    #2
    Hello Gary,

    Thank you for your post.

    The OnStartUp() method will be called for indicators in the Market Analyzer window. Pressing F5 does not reload the Market Analyzer per se, it reloads all NinjaScript, so this would recall the OnStartUp() method as the NinjaScript files will be restarted.

    Please let me know if I may be of further assistance.

    Comment


      #3
      That is what I thought and that is what I see on 1 computer. However, on another computer the indicator never executes OnStartUp and continues to show '...' in the plot column.
      I have tried different data feeds to see if that makes a difference but it hasn't (simulated data feed, live data feed from InteractiveBrokers, Replay).

      I have attached the indicator that I am using to test this problem.

      It seems that at least some data has to be present/flowing, even for OnStartUp to be called, is that true? Even on the machine where it was working, if I add an instrument that I normally do not watch and therefore have no data on, it plots '...' (on weekend when no live data).

      Also, if I have one indicator column in MarketAnalyzer and 3 instrument rows, how many times should I expect to see OnStartUp called for that indicator?

      Please advise what I can do to verify data is flowing through my indicator in MarketAnalyer.

      Thanks,
      Gary
      Attached Files

      Comment


        #4
        Hello Gary,

        Thank you for your response.

        Can you attach a screenshot of the Market Analyzer where the OnStartUp() method is not called as expected?

        I look forward to your response.

        Comment


          #5
          Screen shot

          Attached in the MarketAnalyzer. 3 instruments.
          I also attached the control panel at the same time to show that there was data flowing for the $EURUSD

          The other bit of evidence is the blank Output window - it should have printed "OnStartUp" but did not.

          Gary
          Attached Files

          Comment


            #6
            Originally posted by GaryAlbers View Post
            That is what I thought and that is what I see on 1 computer. However, on another computer the indicator never executes OnStartUp and continues to show '...' in the plot column.
            I have tried different data feeds to see if that makes a difference but it hasn't (simulated data feed, live data feed from InteractiveBrokers, Replay).

            I have attached the indicator that I am using to test this problem.

            It seems that at least some data has to be present/flowing, even for OnStartUp to be called, is that true? Even on the machine where it was working, if I add an instrument that I normally do not watch and therefore have no data on, it plots '...' (on weekend when no live data).

            Also, if I have one indicator column in MarketAnalyzer and 3 instrument rows, how many times should I expect to see OnStartUp called for that indicator?

            Please advise what I can do to verify data is flowing through my indicator in MarketAnalyer.

            Thanks,
            Gary

            NT OnStartUp() - MyTimer.Enabled obj_ct=1 <<- from being on a chart
            NT OnStartUp() - MyTimer.Enabled obj_ct=2 <<- added to a new chart
            NT OnTermination() MyTimer.Dispose <<- removed from the new chart

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            111 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            59 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            38 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            41 views
            0 likes
            Last Post TheRealMorford  
            Started by Mindset, 02-28-2026, 06:16 AM
            0 responses
            78 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Working...
            X