• 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

Adding DataSeries to Indicator

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

    Adding DataSeries to Indicator

    Hello,

    I was hoping you could help me to add a Data Series to the BarNumbers Indicator I have attached.

    I want to be able to access the bar count through Bloodhound and therefore need a data series to reference the current count.

    Thank you!
    Attached Files

    #2
    Hello fibbee,

    I'm not quite understanding what you are trying to achieve.

    The CurrentBar or CurrentBars[BarsInProgress index] will have the currently processed bar number for the primary or added series.

    For example
    Print(MyIndicator().CurrentBar);

    Below is a publicly available link to the help guide on CurrentBar.
    https://ninjatrader.com/support/help...currentbar.htm


    To add a series to a script use Add(); with the appropriate instrument name, period, and interval.
    Below is a publicly available link to the help guide.
    https://ninjatrader.com/support/helpGuides/nt7/add3.htm
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      I am trying to add a data series to this indicator so I can use a threshold solver to know when the bar count is greater than or less than a certain number.

      Currently, there is only a plot value that is accessible which serves no benefit inside of Bloodhound.

      I can hack my way around it using other solvers but its sloppy and would be easier if I had an indicator, that counts bars and that data is referenceable by Bloodhound.

      Comment


        #4
        Hello fibbee,

        The Add() method will add a data series to the script so that this historical and real-time data will also cause OnBarUpdate to trigger.

        I'm not certain how this would be used to provide a bar count to bloodhound indicators.

        The CurrentBar object would be the number of the processing bar of the script.

        You can also create a custom series to fill with data.

        Below is a publicly available link to the help guide on this.
        https://ninjatrader.com/support/help...ries_class.htm
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Vincere, Today, 01:59 AM
        0 responses
        4 views
        0 likes
        Last Post Vincere
        by Vincere
         
        Started by Davoone1, Yesterday, 07:28 PM
        1 response
        7 views
        0 likes
        Last Post NinjaTrader_ChrisSch  
        Started by Bobisam, Yesterday, 10:53 PM
        1 response
        6 views
        0 likes
        Last Post Bobisam
        by Bobisam
         
        Started by quantera, Yesterday, 05:38 PM
        0 responses
        5 views
        0 likes
        Last Post quantera  
        Started by ciro1963, Yesterday, 03:58 PM
        0 responses
        6 views
        0 likes
        Last Post ciro1963  
        Working...
        X