Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Issues Related to Calculate.OnEachTick

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

    Issues Related to Calculate.OnEachTick

    I have developed an unmanaged Strategy that bases all trade entry orders and some trade exit orders on indications from a hosted Indicator that calculates once at the close of each bar. The Strategy currently uses AddDataSeries(BarsPeriodType.Tick, 1) to load a tick data series that is used for intrabar profit-target and stop-loss order management.

    All that seems to work correctly. However, the Indicator needs a large amount of historic data to be able to generate reliable trade indications and downloading a long parallel historic tick data series takes a ridiculous amount of time. Since tick data is only needed during new bars I want to eliminate the tick data series and change the Strategy to Calculate.OnEachTick. If that is done will it be necessary to also change the Indicator to Calculate.OnEachTick, and make suitable modifications to its OnBarUpdate() code to watch for IsFirstTickOfBar and then look back one trade to get bar closing prices, or will NT take of that if the Indicator is left set to Calculate.OnBarClose as it is now?

    #2
    Hello caveat_lector,

    Thank you for your note.

    An indicator hosted within a strategy will use the same calculation mode as the strategy, so without looking at your code for the indicator, it sounds likely that you'd want to modify it to use IsFirstTickOfBar, yes.

    Please let us know if we may be of further assistance to you.

    Comment


      #3
      Ok, Thanks.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      116 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      61 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      40 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      43 views
      0 likes
      Last Post TheRealMorford  
      Started by Mindset, 02-28-2026, 06:16 AM
      0 responses
      82 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X