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

refering to chart's main bar series when indicator input set to an indicator

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

    refering to chart's main bar series when indicator input set to an indicator

    is there a low resource way to refer to the chart's main data series (say NQ 03-21 (700 Volume) ) when the indicator that is added to the chart pane is set manually via input series to another indicator (say OrderFlowCumulativeDeltaClose) ?
    i've made an indicator that analyzes cumulative delta but also want to be able to compare the cumulative delta bar to the main chart series bar. i'm assuming i need to add a second bar series NQ03-21(700Volume) within the indicator as i would for the other indicators i've put together that would plot indicators made from minute bars onto the 700volume chart. I'm hoping there's a way to use the already loaded main chart bar series to avoid using too much processing resource.
    thanks/w

    on a side note: - where are chart drawings stored and what creates the global drawings folder in templates chart ?
    no need to address side note now - i just found a post regarding the same issue with drawings and i'm updating to 8.23.2
    Last edited by stafe; 01-06-2021, 10:10 PM.

    #2
    Hello stafe,

    Thank you for the post.

    I believe you should be able to just use Close or the other existing series the script has in this situation. When you input another indicator you would need to utilize the Input property to get that data. https://ninjatrader.com/support/help.../nt8/input.htm



    For the side question, are you asking where they are stored when saving the workspace etc or while the platform is running? While its running they exist in a collection, they otherwise exist in the various workspace files when saved. If you are seeing an issue that was addressed in another post then yes please update and re test that as well.


    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      i should have been less vague - the indicator in question is a series of moving averages built into one - what i'm doing with it is placing it in the same chart pane as the OrderFlowCumulativeDelta indicator and setting the input via the indicator parameter window to OFCD. So far all the calculation in the indicator use the bar values (Close) of OFCD.
      I'm a little confused as to whether this is the right approach if i want to economically reference the main chart bar series from which OFCD is derived.
      The other approach i was thinking about was creating the indicator so that it makes OFCD a 2ndary bar series and uses BarsArray[1] to calculate the MAs. The thing i don't understand about OFCD is "can it be loaded like a 2nd bar series (AddDataSeries(BarsPeriodType.Minute, 2) or (AddDataSeries("ES 03-21", BarsPeriodType.Minute, Pitch); and how do i do that so that the OFCD bars will plot in the separate chart pane the indicator is placed in" -- i'll be using this indicator on both minute based charts and volume based charts for NQ MNQ ES and MES
      In its current approach if i reference Close i get the OFCD close not the main bars series for the chart...

      i'll have to deal with the chart drawings issue at a later date - it's a strange one - same installations on two different machines behaving differently when saving drawings or not...
      Last edited by stafe; 01-07-2021, 10:22 AM.

      Comment


        #4
        Hello stafe,

        Thank you for the post.

        To take the input you pass to the indicator you would need to use Input[0] : https://ninjatrader.com/support/help.../nt8/input.htm
        You should be able to see this by printing the difference between Close or Input:

        Print(Close[0] + " " + Input[0]);

        I tried what you described on my end and see the OFCD data under Input[0] and otherwise see the main bar series on Close[0].

        If you are still seeing that the Close is mapped to the OFCD somehow you would likely need to use a secondary series in that use case.


        i look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment


          #5
          odd, i've discovered that Input[0] refers to the previous bar when the OFCD is attached to an indicator
          in other words...
          Input[0] = Close[1]



          Last edited by stafe; 03-08-2021, 10:10 AM.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by cmtjoancolmenero, Yesterday, 03:58 PM
          11 responses
          39 views
          0 likes
          Last Post cmtjoancolmenero  
          Started by FrazMann, Today, 11:21 AM
          0 responses
          5 views
          0 likes
          Last Post FrazMann  
          Started by geddyisodin, Yesterday, 05:20 AM
          8 responses
          52 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by DayTradingDEMON, Today, 09:28 AM
          4 responses
          27 views
          0 likes
          Last Post DayTradingDEMON  
          Started by George21, Today, 10:07 AM
          1 response
          22 views
          0 likes
          Last Post NinjaTrader_ChristopherJ  
          Working...
          X