Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.



    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.
    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.
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Christopher_R, Today, 12:29 AM
        0 responses
        6 views
        0 likes
        Last Post Christopher_R  
        Started by sidlercom80, 10-28-2023, 08:49 AM
        166 responses
        2,235 views
        0 likes
        Last Post sidlercom80  
        Started by thread, Yesterday, 11:58 PM
        0 responses
        3 views
        0 likes
        Last Post thread
        by thread
         
        Started by jclose, Yesterday, 09:37 PM
        0 responses
        7 views
        0 likes
        Last Post jclose
        by jclose
         
        Started by WeyldFalcon, 08-07-2020, 06:13 AM
        10 responses
        1,415 views
        0 likes
        Last Post Traderontheroad  
        Working...
        X