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

Disappearing bars when strategy applied to chart.

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

    Disappearing bars when strategy applied to chart.

    I am developing a strategy and there are some strange behaviors I am wondering about. Hoping I can get some guidance.

    First off, if I create a band new chart, say for "RTY 12-23" in a new tab with no indicators or strategies, then add a strategy, even a simple one like "Sample MA crossover", the bars on the chart disappear and the price scale is centered at zero. If you enable the strategy, the price scale recovers to the current price and the strategy begins. But when disabled, it goes back to zero. It was doing this on my strategy, and thought I had done something to cause it, but I can repeat it on other sample strategies as well. If, however, you add any indicator to the chart, like an EMA, this behavior goes away. So, for now I just add an indicator to keep it visible.

    My strategy also includes the EMA, SMA, and Swing indicators in the code using the AddChartIndicator() function. This works well, but also is only visible when enabled. Is there a way to keep them visible when not enabled?

    My strategy primarily uses the 1 Minute chart, but also needs a 5 Minute data series. This works ok and the 5-minute SMA displays as expected on the 1-minute chart. However, the execution markers disappear when the strategy is attached and enabled. If I manually add the 5-minute data series to the chart, the execution markers display on the 5-minute pane, but not the 1-minute one where the strategy is applied.

    I have a lot more questions, but this is a good start. Will keep searching the Forum and see if I can find some of the other answers.

    Thanks in advance!
    Dave.

    #2
    Hello d3whiteley,

    From the given details I couldnt really say what may be happening. If the price scale goes to 0 that would usually mean something is being autoscaled at 0. You may need to look in the data box or drawing object list to see what that is.

    The sampleMACrossOver only has two sma indicators so that should not produce a 0 value unless for some reason they are calculating 0 which would be unexpected.

    If you have other questions please make seperate posts for those, we can work on the initial question about the scale going to 0 here.
    JesseNinjaTrader Customer Service

    Comment


      #3
      I think it may be my copy of NinjaTrader. My son tried it on his computer and it did not go to zero.

      Comment


        #4
        Hello d3whiteley,

        In that case you may want to do a clean install on your PC to make sure there is nothing imported that is changing the result. The steps to do that are listed below.
        1. Exit NinjaTrader
        2. Open the documetns folder
        3. Rename the NinjaTrader 8 folder to NinjaTrader 8.old
        4. Reinstall the platform
        5. Retest the situation.

        JesseNinjaTrader Customer Service

        Comment


          #5
          Thank you! That worked. I'll post my other questions in new threads.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by burtoninlondon, Today, 12:38 AM
          0 responses
          10 views
          0 likes
          Last Post burtoninlondon  
          Started by AaronKoRn, Yesterday, 09:49 PM
          0 responses
          14 views
          0 likes
          Last Post AaronKoRn  
          Started by carnitron, Yesterday, 08:42 PM
          0 responses
          11 views
          0 likes
          Last Post carnitron  
          Started by strategist007, Yesterday, 07:51 PM
          0 responses
          14 views
          0 likes
          Last Post strategist007  
          Started by StockTrader88, 03-06-2021, 08:58 AM
          44 responses
          3,983 views
          3 likes
          Last Post jhudas88  
          Working...
          X