• 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 alextrd, Today, 01:51 PM
        1 response
        6 views
        0 likes
        Last Post NinjaTrader_JoshG  
        Started by Boonfly8, Today, 12:10 PM
        1 response
        5 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by NinjaTrader_PaulH, Today, 11:24 AM
        0 responses
        5 views
        0 likes
        Last Post NinjaTrader_PaulH  
        Started by catulopc, Today, 10:58 AM
        1 response
        7 views
        0 likes
        Last Post NinjaTrader_SergeyS  
        Started by swcooke, Today, 09:20 AM
        7 responses
        25 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Working...
        X