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 CortexZenUSA, Today, 12:53 AM
        0 responses
        1 view
        0 likes
        Last Post CortexZenUSA  
        Started by CortexZenUSA, Today, 12:46 AM
        0 responses
        1 view
        0 likes
        Last Post CortexZenUSA  
        Started by usazencortex, Today, 12:43 AM
        0 responses
        5 views
        0 likes
        Last Post usazencortex  
        Started by sidlercom80, 10-28-2023, 08:49 AM
        168 responses
        2,265 views
        0 likes
        Last Post sidlercom80  
        Started by Barry Milan, Yesterday, 10:35 PM
        3 responses
        12 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Working...
        X