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 junkone, 04-21-2024, 07:17 AM
            9 responses
            67 views
            0 likes
            Last Post jeronymite  
            Started by trilliantrader, 04-18-2024, 08:16 AM
            4 responses
            18 views
            0 likes
            Last Post trilliantrader  
            Started by mgco4you, Today, 09:46 PM
            1 response
            10 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Started by wzgy0920, Today, 09:53 PM
            0 responses
            10 views
            0 likes
            Last Post wzgy0920  
            Started by Rapine Heihei, Today, 08:19 PM
            1 response
            10 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Working...
            X