Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Strategy with tick replay loading time

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

    Strategy with tick replay loading time

    I have a strategy that requires tick replay to be enabled in the data series of the chart.
    I am calculating volume at the tick level and if I do not use tick replay the sum of the volume starts at zero instead of the value that has already accumulated over the life of the chart.

    I am looking for any tips that will speed the loading process of the strategy.

    I use the strategy like an auto-trader, I turn it on when I see a setup coming.

    If I enable the strategy without tick replay it takes about 7 seconds. When I enable the strategy with tick replay it takes at least 40 seconds.
    Frequently by the time the strategy has loaded the trade has already happened.

    I have the chart time frame at one day to reduce the amount of data that needs to be calculated.

    Thanks for any help


    #2
    Hello sdauteuil,

    Thanks for your post.

    You have the right idea to reduce the amount of historical data to load. You have it reduced to 1 day, can you reduce it further? Note that you can change from days to load to Bars to load and specify how many bars to load. Be careful not to compromise the amount of data your indicators and calculations need to be accurate.

    From a program design perspective, you may want to consider using a chart button that can be clicked on by you to enable the strategy to trade when you see the set-up coming. This would avoid the need to load the strategy each time. Here is a link to an example strategy that places two button on the chart to enable long trades or short trades and should give you some ideas of how button(s) could be used in your strategy to accomplish your goal. https://ninjatraderecosystem.com/use...bar-buttons-2/ Please note: The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The add-ons listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.

    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Thanks

      I have been looking for sample code to add a chart button.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by algospoke, Yesterday, 06:40 PM
      2 responses
      19 views
      0 likes
      Last Post algospoke  
      Started by ghoul, Today, 06:02 PM
      3 responses
      14 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by jeronymite, 04-12-2024, 04:26 PM
      3 responses
      45 views
      0 likes
      Last Post jeronymite  
      Started by Barry Milan, Yesterday, 10:35 PM
      7 responses
      21 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by AttiM, 02-14-2024, 05:20 PM
      10 responses
      181 views
      0 likes
      Last Post jeronymite  
      Working...
      X