• 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

Retrieve Custom Bar Type Information

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

    Retrieve Custom Bar Type Information

    Hello,

    I have created a custom bar type. I would like to access this custom bar type's Open, High, Low, Close and Volume values. Can this be done? It should be doable as the values appear correctly in the Data Box. Can anyone suggest how this data can be retrieved via code? Any suggestions would be appreciated. Thank you.

    #2
    Hello Zeos6,

    Thanks for opening the thread.

    A BarType is a property of a data series. Using a different BarType will modify the series and its associated OHLC values. If you add an indicator to a chart with a Custom BarType applied and that indicator prints OHLC values, the OHLC values of that BarType will be printed.

    You would just have to access the associated PriceSeries as usual with the data series being one with a custom bartype. I.E. Open[0], High[0], Low[0], Close[0].

    If you have any additional questions, please don't hesitate to ask.
    JimNinjaTrader Customer Service

    Comment


      #3
      Thanks for the reply Jim, but ...

      I do not think you reply is correct. Have you tried it with the Heikin Ashi bar type? If you access the Open, High, ... as you suggested, you get the underlying bar Open, High, ... rather than the haOpen, haClose, ... I'd like to retrieve the haOpen, haClose... Is this possible?

      EDIT:
      You are correct Jim but here is the confusion on my part. I put up a simple indicator on the Heiken Ashi bar type chart. It simple prints current bar index and high, low, ... values. The issue seems to be with what is going on at the start of the data period. The bar indices behave strangely relative to time stamps. I have attached a pic.
      Attached Files
      Last edited by Zeos6; 09-26-2017, 07:37 AM.

      Comment


        #4
        Hello Zeos6,

        I created a similar indicator and a video discussing the data I am seeing.

        Demo: https://www.screencast.com/t/0eubQYj8fu

        If you have any further questions, please include an example we can look at together and I will be happy to provide further input.
        JimNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by jshapen, Yesterday, 06:35 PM
        0 responses
        9 views
        0 likes
        Last Post jshapen
        by jshapen
         
        Started by leocrespo, 11-06-2015, 01:48 AM
        5 responses
        1,767 views
        0 likes
        Last Post nkhoi
        by nkhoi
         
        Started by NT8Newbie, Yesterday, 12:49 PM
        0 responses
        16 views
        0 likes
        Last Post NT8Newbie  
        Started by pdennis, Yesterday, 11:43 AM
        0 responses
        5 views
        0 likes
        Last Post pdennis
        by pdennis
         
        Started by Duval, Yesterday, 08:38 AM
        0 responses
        17 views
        0 likes
        Last Post Duval
        by Duval
         
        Working...
        X