• 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

Obtaining time of a bar which is not based on price data

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

    Obtaining time of a bar which is not based on price data

    My indicator computes a simple median of the last X bars of data. The input series to my indicator will usually either be the VOL indicator, or the Range indicator.

    However, I would also like the ability to exclude certain dates from my calculation. However, if VOL is the input to my indicator, checking the date by accessing "Time[0]" returns a time of 1/1/1800.

    The input to the VOL indicator is some price data series, like the Close. Is there a way to get to the price bar from my indicator? I would like to keep this indicator generic so that it can take any input series and would rather not have to feed it price bars as input so that I can access the dates.

    #2
    Your observation is correct JoshDance - to access the bars timestamps via the indicator on indicator approach, please add a price series programmatically in your script and then for example use Times[index][barsback] to access them.
    BertrandNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Newtrader101, Today, 08:01 AM
    0 responses
    4 views
    0 likes
    Last Post Newtrader101  
    Started by Johnny Santiago, 10-11-2019, 08:21 AM
    6 responses
    101 views
    0 likes
    Last Post 4x777
    by 4x777
     
    Started by pjsmith, Today, 02:42 AM
    2 responses
    16 views
    0 likes
    Last Post pjsmith
    by pjsmith
     
    Started by moyerchopra, Yesterday, 11:43 PM
    0 responses
    5 views
    0 likes
    Last Post moyerchopra  
    Started by ttodua, Yesterday, 11:40 PM
    0 responses
    6 views
    0 likes
    Last Post ttodua
    by ttodua
     
    Working...
    X