• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Deficiencies between 2nd series indicator values and actual chart indicator values

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

    Deficiencies between 2nd series indicator values and actual chart indicator values

    Hello,

    I have faced the following issue:

    1. I am adding secondary data series to a strategy
    Code:
    if (State == State.Configure){
       AddDataSeries(BarsPeriodType.Minute,500);
    }
    2. Print the 14-period ATR value at the close of each secondary series bar
    Code:
    if (BarsInProgress == 1){
       Print("New secondary series bar: "+ATR(14)[0].ToString());
    }
    3. Compare these printed values with the 14-period ATR values on the actual 500-minute chart (should be the same, as I would have expected)
    4. And observe big differences on all the bars (around 10 points)

    If I use the same secondary series as the main series or series with rather similar period (for example, main series = 5-minute and secondary series = 5-minute or 60-minute) then there are no differences between those printed by the strategy and by those observed on the actual chart.

    Can you please advise me on if there is anything I do wrong?

    Best regards,
    Alexei

    #2
    Hello Alexei,

    Are both the script and the chart using the same number of Days to load?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hello Chelsea,

      I guess the answer is "no" as I haven't specified the amount of bars to load in the AddDataSeries method. Can this be the reason of the issue?

      In relation to this, can you please advise me how can I specify the barsPeriodType and barsToLoad parameters in one AddDataSeries call?

      Best regards,
      Alexei

      Comment


        #4
        Hello Chelsea,

        Sorry, I have understood what you mean - please, disregard my previous message. I need to launch the strategy on a chart that has enough loaded days for the ATR(14) to be calculated on the secondary series. Thank you for your help!

        Best regards,
        Alexei

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by gzgchzfe, Today, 12:02 AM
        0 responses
        2 views
        0 likes
        Last Post gzgchzfe  
        Started by simjs, Yesterday, 08:11 PM
        0 responses
        3 views
        0 likes
        Last Post simjs
        by simjs
         
        Started by mrlucky1x, Yesterday, 06:01 PM
        0 responses
        3 views
        0 likes
        Last Post mrlucky1x  
        Started by dedouglas, Yesterday, 03:17 PM
        1 response
        9 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by Jugado, Yesterday, 02:22 PM
        2 responses
        30 views
        0 likes
        Last Post Jugado
        by Jugado
         
        Working...
        X