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

In Market Playback plots shows momentarily then goes away, but trades execute

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

    In Market Playback plots shows momentarily then goes away, but trades execute

    Hi,

    I've developed a strategy that I've been working with for quite a while and everything has worked as expect on non-market replay charts and in the strategy analyzer.

    The issue is that when I run my strategy in Market Playback, the strategy plots (mostly OHLC type lines) show momentarily then go away, however the strategy does execute trades and stays enabled. Similarly, if I right-click the playback chart and choose "Reload NinjaScript" all the strategy plots will momentarily flash on the screen and then immediately go away, but trades will continue to execute and the strategy still stays enabled. If that isn't quirky enough, as I'm writing this I've discovered that enabling a built-in NT8 strategy, such as 'Sample MA Crossover' not only displays correctly itself, but also somehow forces my custom strategy's plots to show up!

    I suppose that's a workaround of sorts, but ideally I would be able to have my strategy's plots show correctly without needing to enable another strategy to do it. I've tried several different tweaks to various settings (onBarClose vs OnPriceChange and 'Bars required to trade') and so far I haven't found anything to fix this behavior. Thank you for any assistance in getting the strategy to display properly in Market Playback.

    #2
    Is this with an indicator?
    are you calling update ()?

    Comment


      #3
      Hello Calebg,

      Thank you for the post.

      Based on the description it sounds like the strategy is having a rendering problem based on the logic being used. The test you did with the SampleMACrossOver can help confirm this, the sample does not force anything to plot but does use the suggested approach at displaying used indicators visually. You can also develop your strategy to plot by its self without the need of an indicator, however, depending on the logic used will determine if that plot will work as you are expecting or not. One example where plotting may work unexpectedly would be plotting only from a secondary series instead of the primary series, that can produce unexpected results or invalid data points leading to non-visible plots.

      Can you provide a sample of how you are currently plotting the value which is disappearing? Another approach would be to create a new empty strategy and only add the plotting logic, this will help isolate what is happening further or you could provide that as an attachment with your reply if needed.

      I look forward to being of further assistance.
      JesseNinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Waxavi, Today, 02:10 AM
      1 response
      17 views
      0 likes
      Last Post NinjaTrader_LuisH  
      Started by Kaledus, Today, 01:29 PM
      5 responses
      13 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by Waxavi, Today, 02:00 AM
      1 response
      12 views
      0 likes
      Last Post NinjaTrader_LuisH  
      Started by alifarahani, Today, 09:40 AM
      5 responses
      23 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by gentlebenthebear, Today, 01:30 AM
      3 responses
      17 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Working...
      X