• 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 CDXTrader, Today, 12:29 AM
    0 responses
    1 view
    0 likes
    Last Post CDXTrader  
    Started by TopGun13, Yesterday, 10:35 PM
    0 responses
    1 view
    0 likes
    Last Post TopGun13  
    Started by Audiofail, Yesterday, 05:40 AM
    6 responses
    18 views
    0 likes
    Last Post willwin
    by willwin
     
    Started by jerblaster23, Yesterday, 03:42 PM
    1 response
    12 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by brian meade, Yesterday, 01:39 PM
    2 responses
    11 views
    0 likes
    Last Post brian meade  
    Working...
    X