Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Daily ATR

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

    Daily ATR

    Hi, I'm trying to access the daily ATR from my min chart. The daily ATR values I'm accessing from the min chart are not the same as the values shown on the ATR indicator that is on my daily chart. Any thoughts?

    protected override void Initialize()
    {
    Add(PeriodType.Day, 1);
    }

    // on bar update section

    if (BarsInProgress == 1)
    {
    ATRval = ((ATR(period)[0]);
    }

    if (BarsInProgress == 0)
    {
    ATRBarVal.Set(ATRval);
    }

    #2
    pman777, thanks for the post - which CalculateOnBarClose setting are you working with here? How many days of data is loaded for the minute chart from which you attempt to access the daily ATR values?
    BertrandNinjaTrader Customer Service

    Comment


      #3
      tx u for response Bertrand. CalculateOnBarClose is set to "True" adn I have 10 days of data loaded on my min chart

      Comment


        #4
        Thanks, please try loading more data, like 30 days. So you would have enough to correctly calculate the value on the higher timeframe for the ATR. With 10 calendar days and an ATR spanning 14 bars, you would see differences as it's then still playing 'catch up' to current values.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          that did it Bertrand ... thank you!!!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Jeremytang, 07-14-2018, 06:45 PM
          21 responses
          439 views
          0 likes
          Last Post mav8rick  
          Started by LeonK, Yesterday, 09:26 PM
          1 response
          7 views
          0 likes
          Last Post bltdavid  
          Started by NicholasJoannette, Yesterday, 03:01 PM
          2 responses
          11 views
          0 likes
          Last Post NicholasJoannette  
          Started by rach1994, Yesterday, 12:20 PM
          1 response
          35 views
          0 likes
          Last Post bltdavid  
          Started by litamm89, Yesterday, 11:00 AM
          5 responses
          21 views
          1 like
          Last Post rafael_delima86  
          Working...
          X