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

Indicator calculating two data series

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

    #16
    Spreads can certainly be built from historical data. If you can't do that there is some other problem. It only works on time-based bars; the current version will throw an exception if the bars aren't time-based. Try making a chart which plots both instruments for the entire period you want using time-based bars. Then add the Spread indicator. It should plot the spread for every bar. If it doesn't try re-downloading it if you have an old copy (older than 6 months). You can also try my Index indicator for more complex spreads, but I wouldn't expect different behavior for historical data.

    Comment


      #17
      Maxima, I use the spread indicator and found the same issue. Using a base chart that goes back for days that I haven't had the computer running creates holes in the spread plot. I found that using the historical download tool will fix the problem. Download the 'spread' symbols first with a starting date further back than the starting date of the chart. Then do the same thing for the symbol of the chart. That download will update the chart and spread will have all the 'minute' data for all the symbols in the spread and there won't be any holes in your historical plot.

      Comment


        #18
        I am sure you are right. I tried to load data and now it doesnt show any charts beyond yesterday. I think I'll stick with Sierra for now. 15th attempt to get some good from NT in past 3 yrs hoping it has been matured. and failure again....

        Comment


          #19
          No indicator can produce good output if the input data is missing. Many indicators will, however, produce garbage, On a single-instrument chart, you would normally have the data plotted on the chart, so if data were missing, you would see it, and hopefully know to ignore the indicator output. For example, if you're missing 7 days of data and plotting a 21-day moving average, an average will plot the entire time, but it will be wrong for 20 days following the missing data.

          The Spread indicator needs a second data series, the Index indicator can have many, and they aren't necessarily visible on the chart, The Spread indicator, and the default behavior of the Index indicator, is to plot nothing unless all inputs are available. You really don't want to know the spread between today's price of "X" and yesterday's price of "Y".

          I normally select the box "Get data from server (If available)", and I don't select "Save chart data as historical". I periodically download recent historical data in the Instrument Manager to make my historical database current.

          It sounds like your settings must have been the reverse of mine. This would leave gaps in your historical data which you had instructed Ninjatrader not to fill. That would explain why the Spread indicator didn't plot anything (which is a lot better than plotting garbage).
          Last edited by kdoren; 12-03-2011, 03:26 AM.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by DanielSanMartin, Yesterday, 02:37 PM
          2 responses
          13 views
          0 likes
          Last Post DanielSanMartin  
          Started by DJ888, 04-16-2024, 06:09 PM
          4 responses
          12 views
          0 likes
          Last Post DJ888
          by DJ888
           
          Started by terofs, Today, 04:18 PM
          0 responses
          11 views
          0 likes
          Last Post terofs
          by terofs
           
          Started by nandhumca, Today, 03:41 PM
          0 responses
          8 views
          0 likes
          Last Post nandhumca  
          Started by The_Sec, Today, 03:37 PM
          0 responses
          7 views
          0 likes
          Last Post The_Sec
          by The_Sec
           
          Working...
          X