Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

IsSuspendedWhileInactive not working?

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

    IsSuspendedWhileInactive not working?

    Hi,

    I am running an indicator on 9 charts simultaneously which are all added to a single window in the new tabbed format. The indicator on these charts writes information to text files on every market tick so it is easy to see that last indicator refresh by chaecking the last modified times of the files.

    If the charts arnt selected the indicator stops updating, sometimes immediately and sometimes within 5 minutes or so. If i reselect the chart I can witness the indicator quickly catch up to the current bar. It seems as though the data is updated on these charts fine, just the indicator isnt running.

    All logic is in OnBarUpdate() which is set to update "On Each Tick" in the indicator properties section.

    All these indicators have IsSuspendedWhileInactive set to false. ( I have triple checked this)

    There is an ambiguous sentence in the NT8 help guide about the IsSuspendedWhileInactive" it is as follows.

    "This property returns true if indicator can take advantage of suspension optimization; otherwise, false. Default set to false."
    Does this mean that NT will decide when to force this value to "true" even though it is set to false? This wouldnt make sense to me if its the case but just checking on this one.

    The behavior I am experiencing is mostly exactly like IsSuspendedWhileInactive is set to "true" when it definitely isnt.

    I thought maybe there could be an XML save default file issue and this property could be changed in the indicator properties but I cant find it anywhere.

    Can anyone shed some light on this? Is it a bug or am I making a mistake here?

    I have restarted my machine and NT8 and am running the current Beta 8.0.0.8 64bit version

    Cheers.

    #2
    Hello marty087,

    Thank you for writing in.

    NinjaTrader does not change the IsSuspendedWhileInactive to either true or false on its own; this property is set by the user.

    The statement is merely saying that it can return true or false if you place the property into a print, for example.

    I am unable to reproduce this behavior on my end.

    Would you be able to provide the indicator you are using so I may test on my end? If not, would you be able to produce a sample script that can duplicate this behavior?

    Additionally, what instruments are you testing on?
    Zachary G.NinjaTrader Customer Service

    Comment


      #3
      Ok, I have worked out whats going on here. Seems I was a little to eager to use NT's new fearture "ChartBars.ToIndex" without fully understanding how it operates.

      I had this statement
      if (CurrentBar != ChartBars.ToIndex)return;

      Instead of this statement
      if (CurrentBar < Count-2)return;

      The reason I had this change is so that I would hit f5 at a historical point on the chart and have the indi load for the last bar.

      It turns out that "ChartBars.ToIndex" doesnt update when the chart is not loaded. As I was running the indi on a 5 min chart, once the new bar clicked over this was causing my indi to no longer run as CurrentBar and ChartBars.Index seperate by 1 for every bar that passes.

      On with life then!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by bmartz, Today, 09:30 AM
      2 responses
      11 views
      0 likes
      Last Post bltdavid  
      Started by f.saeidi, Today, 11:02 AM
      1 response
      3 views
      0 likes
      Last Post NinjaTrader_BrandonH  
      Started by geotrades1, Today, 10:02 AM
      4 responses
      12 views
      0 likes
      Last Post geotrades1  
      Started by rajendrasubedi2023, Today, 09:50 AM
      3 responses
      16 views
      0 likes
      Last Post NinjaTrader_BrandonH  
      Started by lorem, Today, 09:18 AM
      2 responses
      11 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Working...
      X