Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Allow quicker chart display update interval

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

    #16
    charts refreshes every second

    I tried a lot of different settings between .1 and 1.

    I have only one chart running in this workspace (in replay).

    None of the settings below one second have any effect at all and still give the same one second refresh rate. Settings of more than one second will slow it down even more.

    Noticed this in real time over the last couple of days. During the crash on Thursday my charts were just loafing along, nice 'n easy. Liike a grandfather clock.. tick tock tick tock, very soothing

    Comment


      #17
      Ricam, which feed are you using for real time testing here? I'm getting updates quicker than the second you mentioned here for example on ZenFire. Just follow the same instrument for example parallel on the MA (default highlight duration 1 sec) to compare...perhaps a good time would be the soon coming cash open in US.
      BertrandNinjaTrader Customer Service

      Comment


        #18
        could anybody give me this code as a downloadable indicator?

        Originally posted by JS999 View Post
        Forget about this, they are not going to change it. We already had a discussion about this a long time ago in beta and had to yell and scream just to get it to .1 refresh rate. They originally had the global application locked at .5 seconds where you couldn't adjust it on a chart-by-chart basis. If you want to refresh your chart more frequently, just write an indicator that calls ChartControl.Refresh() on OnMarketData(), like this:

        if (DateTime.Now > lastRefresh.AddMilliseconds(refreshDelay))
        {
        ChartControl.Refresh();
        lastRefresh = DateTime.Now;
        }

        It's not officially supported code, but it works fine.
        Thank you for this fine suggestion. Could you put this into an indicator and compile it as an .cs or zip file so I´m able to import it directly into NT?

        As I have not any programming experience I can´t do it myself.

        THANKS!!!

        Comment


          #19
          Originally posted by resist View Post
          Thank you for this fine suggestion. Could you put this into an indicator and compile it as an .cs or zip file so I´m able to import it directly into NT?

          As I have not any programming experience I can´t do it myself.

          THANKS!!!
          Here is an indicator I exported. Please note that I have NOT actually done testing with this at all, since I don't really use it myself... I just quickly threw together some code for you that should probably work.

          (I happen to use an indicator called Ed's Level 2 which handles its own chart refreshing, so I took some relevant code from that and just put it in this one.)

          Perhaps another programmer could take a look at it and verify that I didn't do anything wrong.

          Here is the relevant code:


          public class ChartRefresh : Indicator
          {
          #region Variables
          // Wizard generated variables
          private int refreshInMilliseconds = 0; // Default setting for RefreshInMilliseconds
          private DateTime lastRefresh;

          // User defined variables (add any user defined variables below)
          #endregion

          /// <summary>
          /// This method is used to configure the indicator and is called once before any bar data is loaded.
          /// </summary>
          protected override void Initialize()
          {
          Overlay = false;
          lastRefresh = DateTime.Now;
          }


          protected override void OnMarketData(MarketDataEventArgs e) {
          try
          {
          if ((e.MarketDataType == MarketDataType.Last) && (refreshInMilliseconds == 0))
          {
          ChartControl.Refresh();
          }
          else if (refreshInMilliseconds != 0)
          {
          if (DateTime.Now > lastRefresh.AddMilliseconds(refreshInMilliseconds) )
          {
          ChartControl.Refresh();
          lastRefresh = DateTime.Now;
          }
          }
          }catch (Exception ex)
          {
          Print(DateTime.Now.ToString() + " " + ex.ToString());
          }
          }

          #region Properties

          [Description("Interval in ms to refresh the chart. 0 refreshes on every tick.")]
          [GridCategory("Parameters")]
          public int RefreshInMilliseconds
          {
          get { return refreshInMilliseconds; }
          set { refreshInMilliseconds = Math.Max(0, value); }
          }
          #endregion
          }
          Attached Files

          Comment


            #20
            wonderful - many thanks to JS999 - very quiock reply !!!!!!!!!!!!!!!!!!!!!!!

            the cpu usage increases up to 100% and if it´s running longer or in more than one window system is slowing down .. so I think there yould be a bug or simply my CPU isto slow for this indicator - but I´ve already searched for the mentioned "Edá Level 2" as I eatrlier used JT-Realstats with NT 6.5 so perhaps it´s interesting, too.

            I´ll be back later and when I had a look to Ed´s Level 2 and how this indicator is running on my system I know whether it´s my system or a bug or NT 7 itself making me "slow"

            good trades and thanks again for your quick reply

            Comment


              #21
              Originally posted by resist View Post
              wonderful - many thanks to JS999 - very quiock reply !!!!!!!!!!!!!!!!!!!!!!!

              the cpu usage increases up to 100% and if it´s running longer or in more than one window system is slowing down .. so I think there yould be a bug or simply my CPU isto slow for this indicator - but I´ve already searched for the mentioned "Edá Level 2" as I eatrlier used JT-Realstats with NT 6.5 so perhaps it´s interesting, too.

              I´ll be back later and when I had a look to Ed´s Level 2 and how this indicator is running on my system I know whether it´s my system or a bug or NT 7 itself making me "slow"

              good trades and thanks again for your quick reply
              Yes, as I said I just ripped the code out and wrote up something quick myself, but no testing on it. It is very possible that there is a bug somewhere, perhaps someone else with more time could take a look at it. Hope it works out for you!

              Comment


                #22
                Originally posted by NinjaTrader_Dierk View Post
                FYI: You probably are aware that the human eye only can catch up to 24 changes a sec. Which would be a ~0.04sec refresh interval. Thus a 0.01 refresh period would make no sense.
                Not to nitpick, but this is completely false. The generally accepted limit of human visual perception would be around a .014sec refresh period (exactly 3 times faster than 24 fps). Out of curiosity, why did you choose to make the max .1 instead of .01 for NT7?
                Last edited by Radical; 05-20-2010, 11:18 AM.

                Comment


                  #23
                  Originally posted by JS999 View Post
                  Yes, as I said I just ripped the code out and wrote up something quick myself, but no testing on it. It is very possible that there is a bug somewhere, perhaps someone else with more time could take a look at it. Hope it works out for you!
                  of course I understood that this was quick help and I thank you therefore very much!!!!!!!

                  just now I was looking for this Ed´s Level 2 indicator and google told me this link to download: http://www.greattradingsystems.com/E...raderindicator

                  I downloaded and installed but receive when importing an error message. (Import failed. The NinjaScript Archive File may contain duplicate method names that already exist on your PC or there is a required file missing on either your PC or in the import archive).

                  Could you recommend a better link to download (don´t know if its allowed to export yours an post here).

                  Comment


                    #24
                    resist,

                    Indicator you are trying to download is most likely not NT7 compatible. Please see the steps in the "Migrating NinjaScript" section for importing NT6.5 indicators and getting them NT7 compatible: http://www.ninjatrader.com/support/f...ad.php?t=21019
                    Josh P.NinjaTrader Customer Service

                    Comment


                      #25
                      if I install a high end graphic card

                      would it be possible to increase update interval to 0 same to NT 6.5 ?????
                      or is all the "work" done in processor / cpu?

                      if yes any suggestion which model of graphic card to buy?

                      Comment


                        #26
                        Most of the work is done by the CPU.
                        Josh P.NinjaTrader Customer Service

                        Comment


                          #27
                          Originally posted by JS999 View Post

                          Forget about this, they are not going to change it. We already had a discussion about this a long time ago in beta and had to yell and scream just to get it to .1 refresh rate. They originally had the global application locked at .5 seconds where you couldn't adjust it on a chart-by-chart basis. If you want to refresh your chart more frequently, just write an indicator that calls ChartControl.Refresh() on OnMarketData(), like this:

                          if (DateTime.Now > lastRefresh.AddMilliseconds(refreshDelay))
                          {
                          ChartControl.Refresh();
                          lastRefresh = DateTime.Now;
                          }

                          It's not officially supported code, but it works fine.
                          Does this code suggestion still work to decrease chart refresh delays?

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by Rapine Heihei, Today, 07:51 PM
                          0 responses
                          3 views
                          0 likes
                          Last Post Rapine Heihei  
                          Started by frslvr, 04-11-2024, 07:26 AM
                          5 responses
                          96 views
                          1 like
                          Last Post caryc123  
                          Started by algospoke, 04-17-2024, 06:40 PM
                          6 responses
                          49 views
                          0 likes
                          Last Post algospoke  
                          Started by arvidvanstaey, Today, 02:19 PM
                          4 responses
                          11 views
                          0 likes
                          Last Post arvidvanstaey  
                          Started by samish18, 04-17-2024, 08:57 AM
                          16 responses
                          61 views
                          0 likes
                          Last Post samish18  
                          Working...
                          X