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

Open Range Indicator

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

    #16
    Hey Harry,

    I haven't had time to install and run it, but it looks fantastic! Nice work! Thanks for posting and for documenting it for users. Nice.

    Scott
    sh_daggett
    NinjaTrader Ecosystem Vendor - NinjaLaunchpad

    Comment


      #17
      Nice work, thanks for coding this up. Works great!

      Comment


        #18
        This is really great!

        Would you mind if I use some of this code.

        I am trying to create a strategy strictly for personal back testing purposes where the entry is a break of the frist 30 minute range with a pre defined target.

        This is probably way beyond my programming skills but I do not like to use other people's code without asking.

        Comment


          #19
          By all means. Thanks for asking. As it says in the code:

          "Feel free to copy, modify, share and use to your heart's content. Use at your own risk."

          Did you get the latest version here?
          sh_daggett
          NinjaTrader Ecosystem Vendor - NinjaLaunchpad

          Comment


            #20
            Hi

            I have modified your script a bit and I am trying to get a strategy to read from this indicator

            I am looking for the RangeHigh and RangeLow but my strategy will not find either of these or neither of the highestHigh or lowestLow

            Any ideas what i am doing wrong

            Thanks in advance

            Richard
            Attached Files

            Comment


              #21
              Originally posted by richbois View Post
              Hi

              I have modified your script a bit and I am trying to get a strategy to read from this indicator

              I am looking for the RangeHigh and RangeLow but my strategy will not find either of these or neither of the highestHigh or lowestLow

              Any ideas what i am doing wrong

              Thanks in advance

              Richard
              Any chance you could show me the Initialize() and OnStartUp() methods of your strategy that you are trying to use this from? Also, are you using the latest Opening Range 4? Opening Range 4 has some methods and properties for getting at the data you're looking for from a strategy, and a flag to tell you if the day's range is in yet. Let me know.
              sh_daggett
              NinjaTrader Ecosystem Vendor - NinjaLaunchpad

              Comment


                #22
                Originally posted by sh_daggett View Post
                Any chance you could show me the Initialize() and OnStartUp() methods of your strategy that you are trying to use this from? Also, are you using the latest Opening Range 4? Opening Range 4 has some methods and properties for getting at the data you're looking for from a strategy, and a flag to tell you if the day's range is in yet. Let me know.
                Hi Scott

                I used version 3 but will look into v4

                Here is the Initialize section the Onstartup is only for the use of Buttons that i have on the chart (see Picture)

                There is also a reference in the Variables section to the YONhilo indicator

                #region Initialize
                protectedoverridevoid Initialize()
                {
                ExitOnClose =
                true;
                ExitOnCloseSeconds =
                60;
                TimeInForce = Cbi.TimeInForce.Day ;
                CalculateOnBarClose =
                false;

                theYONhilo = YONhilo();
                this.Add(theYONhilo);

                }
                #endregion
                Attached Files
                Last edited by richbois; 12-14-2012, 09:08 AM.

                Comment


                  #23
                  Originally posted by richbois View Post
                  Hi Scott

                  I used version 3 but will look into v4

                  Here is the Initialize section the Onstartup is only for the use of Buttons that i have on the chart (see Picture)

                  There is also a reference in the Variables section to the YONhilo indicator

                  #region Initialize
                  protectedoverridevoid Initialize()
                  {
                  ExitOnClose =
                  true;
                  ExitOnCloseSeconds =
                  60;
                  TimeInForce = Cbi.TimeInForce.Day ;
                  CalculateOnBarClose =
                  false;

                  theYONhilo = YONhilo();
                  this.Add(theYONhilo);

                  }
                  #endregion
                  Richard,

                  Try the following approach, as I had a similar problem when using ZigZag from another indicator and this helped. I'm basically moving the creation of the indicator instance to the OnStartUp() method from Initialize().

                  #region Initialize
                  protectedoverridevoid Initialize()
                  {
                  ExitOnClose =
                  true;
                  ExitOnCloseSeconds =
                  60;
                  TimeInForce = Cbi.TimeInForce.Day ;
                  CalculateOnBarClose =
                  false;
                  }

                  protected override void OnStartUp()
                  {
                  theYONhilo = YONhilo(); // Or you could just use OpeningRange4 instead
                  this.Add(theYONhilo);
                  }

                  #endregion

                  Then, you can use TodaysRangeIsIn to see if the opening range is in, and then use the other methods to get at the range high and low (GetRangeHighForDate(DateTime) and GetRangeLowForDate(DateTime) ). You can also use the DataSeries properties, RangeHighSeries and RangeLowSeries if you'd rather use that approach.

                  Let me know if that helps.

                  Scott
                  sh_daggett
                  NinjaTrader Ecosystem Vendor - NinjaLaunchpad

                  Comment


                    #24
                    Thank you Scott

                    I received a private message that told me to post my original question in the Strategy section of the forum and i did

                    With that answer, I finished the strategy and all seems to work

                    The answer was YONhilo().RangeHigh[1] and that gets the info from that indicator

                    If i used OpenRange it would be OpenRange().RangeHigh[1]

                    The only thing i wonder is if your way of doing it would make it faster and better

                    Thanks again for your help

                    Comment


                      #25
                      Originally posted by richbois View Post
                      Thank you Scott

                      I received a private message that told me to post my original question in the Strategy section of the forum and i did

                      With that answer, I finished the strategy and all seems to work

                      The answer was YONhilo().RangeHigh[1] and that gets the info from that indicator

                      If i used OpenRange it would be OpenRange().RangeHigh[1]

                      The only thing i wonder is if your way of doing it would make it faster and better

                      Thanks again for your help
                      I'm glad you got it working. I rewrote the indicator to make it work better when used from strategies, but I can't say it is faster. Just "better" from an old coder's perspective. Also, it uses plots instead of lines, and I like that better.

                      Cheers!
                      sh_daggett
                      NinjaTrader Ecosystem Vendor - NinjaLaunchpad

                      Comment


                        #26
                        thank uuuuuuuuuu

                        Comment


                          #27
                          i cant put it in mt4 ! how can i make that piz

                          Comment


                            #28
                            Originally posted by aiither2005 View Post
                            i cant put it in mt4 ! how can i make that piz
                            Indicators that are design for NinjaTrader are not in the same language as MT4 and therefore will never work.

                            you have to rewrite it into their language

                            Comment


                              #29
                              thank you --- but how can i make it or how can i downlod this platform?

                              Comment


                                #30
                                goto the home page is you want to download the Ninja software

                                NinjaTrader offers exclusive software for futures trading. With our modern trading platform, you will control every step of your trading journey. Open account to trade futures with us!


                                if not you can find someone to program this indi for MT4

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by alifarahani, Today, 09:40 AM
                                6 responses
                                29 views
                                0 likes
                                Last Post alifarahani  
                                Started by Waxavi, Today, 02:10 AM
                                1 response
                                17 views
                                0 likes
                                Last Post NinjaTrader_LuisH  
                                Started by Kaledus, Today, 01:29 PM
                                5 responses
                                13 views
                                0 likes
                                Last Post NinjaTrader_Jesse  
                                Started by Waxavi, Today, 02:00 AM
                                1 response
                                12 views
                                0 likes
                                Last Post NinjaTrader_LuisH  
                                Started by gentlebenthebear, Today, 01:30 AM
                                3 responses
                                17 views
                                0 likes
                                Last Post NinjaTrader_Jesse  
                                Working...
                                X