Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Workspace running in background

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

    Workspace running in background

    Hi,

    I would like to know if there is a way to know if an script is running in background (some event or property to check).

    I have a custom script that is using intrabars data (AddDataSeries(BarsPeriodType.Tick, 1)), OnBarUpdate, OnMarketData and OnRender to print some info around time based bars. My problem is that I'm working with multiple workspace and I change between them. Indicator work as expected in realtime, except when I switch workspace. I read that workspace that are not active are running in background but in my case OnBarUpdate, OnMarketData are frozen while another workspace is active, when workspace is active again, OnMarketData continues in realtime but my OnBarUpdate executes all previous changes but my script expects realtime so ignores those changes (to avoid duplicate ticks with OnMarketData). I know I can check DataSeries Count to check if there are missing data to process, but I wonder if there are a more elegant way.

    Thank you for the help.

    Regards

    #2
    Hello mbcmbc,

    It is possible to set IsSuspendedWhileInactive to false to allow indicators to update when the tab is not active.


    There is not a property to know if a script is suspended.
    We are tracking demand for this with SFT-3301 and I will add your vote.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Ok Thank you for adding my vote.

      For know, IsSuspendedWhileInactive to false solves my problem, thank you!

      Regards

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by r68cervera, Today, 05:29 AM
      1 response
      6 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by geddyisodin, Today, 05:20 AM
      1 response
      11 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by Max238, Today, 01:28 AM
      3 responses
      33 views
      0 likes
      Last Post Max238
      by Max238
       
      Started by timko, Today, 06:45 AM
      2 responses
      13 views
      0 likes
      Last Post NinjaTrader_ChristopherJ  
      Started by habeebft, Today, 07:27 AM
      0 responses
      6 views
      0 likes
      Last Post habeebft  
      Working...
      X