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

HighestBar only return abr [0]

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

    HighestBar only return abr [0]

    Code is :

    int highBarAgo = HighestBar(Jurik_DMX_custom(50), 100);

    highBarAgo is only returning 0 or current bar every time, any ideas?

    Thanks

    #2
    ct, do you see the same for a standard system indicator series?

    Do you have enough data loaded to satisfy the lookback period used?

    Is the value perhaps rising for the lookback, so the current one is indeed the highest one?
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Bertrand

      10 days back on a 9 range chart on crude oil. Bar 0 is not the highest bar for 100 bars. I have it on a strategy but can put in in an indicator.

      Any other ideas?

      Let me try a standard indicator....

      Comment


        #4
        Bertrand

        Changed to use DMI (non Jurik) and it worked. Aha!

        Comment


          #5
          BERTRAND

          Jurik indicator has CalculateOnBarClose = false;

          Comment


            #6
            Then try removing the COBC statememt completely, only set it from the calling indicator.

            Standard RSI on my CL works fine, too.
            BertrandNinjaTrader Customer Service

            Comment


              #7
              Removed cobc from the Jurik indicator . didn't help.

              Tried putting it in an indicator same result.
              Last edited by ct; 02-10-2010, 08:27 AM.

              Comment


                #8
                Did you reapply the indicator completely fresh after the COBC change?

                Any errors in the log showing up?
                BertrandNinjaTrader Customer Service

                Comment


                  #9
                  Bertrand

                  I do get "Default,Call to Jurik DLL failed" in the log but no more detail about the error so it's not happy about something. I added a "if (CurrentBar > 150)" check to see if it was due to not having enough data. I am only using a 50 but thought I would be safe and use 150 bars.

                  The indicator and setting is on the chart and looks right.

                  Comment


                    #10
                    ct, for this error in the log please contact Jurik Research directly...perhaps you need a fresh reinstall of their toolset to iron out the call issue.
                    BertrandNinjaTrader Customer Service

                    Comment


                      #11
                      ok, will send norm an email.

                      Comment


                        #12
                        How to access Jurik DMX from another study

                        The indicator file "Jurik DMX custom" has an "Output Values" region with the following code:

                        [Browsable(false)] // do not remove
                        [XmlIgnore()] // do not remove
                        public DataSeries panel_range_min
                        {
                        get { return Values[0]; }
                        }

                        [Browsable(false)] // do not remove
                        [XmlIgnore()] // do not remove
                        public DataSeries panel_range_max
                        {
                        get { return Values[1]; }
                        }

                        [Browsable(false)] // do not remove
                        [XmlIgnore()] // do not remove
                        public DataSeries DMX_basic
                        {
                        get { return Values[2]; }
                        }

                        Note that DMX output is in the dataseries DMX_basic. To reference this series in another study, use the following ...

                        Jurik_DMX_custom(50).DMX_basic

                        where 50 is your input parameter to DMX. The series "panel_range_min" and "panel_range_max" are set to the constant values of +101 and -101, so by plotting them, the chart is stabilized and not resized on every bar. Applying the function HighestBar to either of these series will produce zero as output.

                        - mark jurik

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by WHICKED, Today, 12:56 PM
                        1 response
                        8 views
                        0 likes
                        Last Post NinjaTrader_Gaby  
                        Started by cre8able, Today, 01:16 PM
                        0 responses
                        2 views
                        0 likes
                        Last Post cre8able  
                        Started by chbruno, 04-24-2024, 04:10 PM
                        2 responses
                        47 views
                        0 likes
                        Last Post chbruno
                        by chbruno
                         
                        Started by WHICKED, Today, 12:45 PM
                        1 response
                        11 views
                        0 likes
                        Last Post NinjaTrader_Gaby  
                        Started by samish18, Today, 01:01 PM
                        0 responses
                        6 views
                        0 likes
                        Last Post samish18  
                        Working...
                        X