• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Chart drawings to mark 2x previous range

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

    Chart drawings to mark 2x previous range

    Hi there, I would like to use the Strategy Builder to mark each bar that has a range 2x or more, than the previous bar's range.

    In Strategy Builder, I can easily test if the current range is equal or greater than, equal or less than etc the previous bar. However I don't know if there's a way of asking if the current bar is "greater or equal than 2 times" the previous bar's range. The multiple of the previous bar's range clearly being the key bit here.

    Can anyone help?

    Thanks very much.

    #2
    Hello ehope,

    Thank you for your note.

    To accomplish this you would have to save the value of the previous bars range to a variable and compare it to the current bar, this would not be possible to build in the strategy builder.

    I have put together a sample indicator which will draw an up arrow if the current bars range is greater than double the previous bars range. This was built using the NinjaScript editor and provided as an example of how you could use the editor to accomplish what you're looking to do.

    Please let us know if you need further assistance.
    Attached Files
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      Thanks very much Alan. And what's the best way to get your code into my NinjaScript Editor?

      Comment


        #4
        Hello Ehope,

        To Import a NinjaScript into NinjaTrader 8 do the following:
        From the Control Center window select Tools -> Import-> NinjaScript...
        Find the file location.

        Then you can open the editor and select the indicator RangeDoublePreviousBarDrawArrow.

        Please let us know if you need further assistance.
        Alan P.NinjaTrader Customer Service

        Comment


          #5
          Great, thanks so much Alan

          Comment


            #6
            Sorry Alan one last step. After importing it how do I then see / use it in the "Strategies" area of my chart?

            Thanks vm

            Comment


              #7
              Hello ehope,

              After you've imported the strategy/indicator you can apply it to a chart using the steps covered 1:00:10 into the following youtube.

              https://www.youtube.com/watch?v=HCyt...We0Nf&index=10

              Please let us know if you need further assistance.
              Alan P.NinjaTrader Customer Service

              Comment


                #8
                Thanks Alan.

                Re the script itself, I think it's returning Arrows when the range of the current bar is larger (by any amount) than the previous. I would like arrows when the current bar's range is twice the previous bar's. I've had a look at the script and couldn't see anywhere obvious to edit, bearing in my I'm a complete beginner at coding.

                cheers

                Comment


                  #9
                  Hello ehope,

                  Correct, the sample code I provided did not include a multiplier. In the support department at NinjaTrader we do not create, debug, or modify code for our clients. This is so that we can maintain a high level of service for all of our clients.

                  You could add this to the script or if you'd like I can have someone from business development reach out regarding a list of third parties that would be interested in building the indicator for you.

                  Please let us know if you need further assistance.
                  Alan P.NinjaTrader Customer Service

                  Comment


                    #10
                    Understood, thanks Alan.

                    Comment


                      #11
                      Hello ehope,

                      I have modified and attached the indicator.

                      Please let us know if you need further assistance.
                      Attached Files
                      Alan P.NinjaTrader Customer Service

                      Comment


                        #12
                        BigCandle arrow

                        eHope, if you are a member of Futures.io there is also an indicator there that will produce an arrow when a candle is larger than an AVERAGE RANGE candle for the instrument, timeframe:

                        Big Candle v1.0
                        Identify unusually large price movements. If the range for the bar is outside of the standard deviation then the bar gets highlighted. There are also options to draw arrows on your main chart, and trigger alerts.

                        It is likely that if you set the period to 1 it would perform as you request. Just a thought.

                        https://futures.io/local_links.php?a...27&linkid=1768

                        But you need to be a member to get to it. The membership is considered cheap by most people.

                        Comment


                          #13
                          Thanks Alan and JMont1, much appreciated.

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by user1986, Today, 07:28 PM
                          2 responses
                          9 views
                          0 likes
                          Last Post NinjaTrader_EricB  
                          Started by ericson, Today, 08:14 PM
                          0 responses
                          5 views
                          0 likes
                          Last Post ericson
                          by ericson
                           
                          Started by jertrade, Today, 06:57 PM
                          0 responses
                          5 views
                          0 likes
                          Last Post jertrade  
                          Started by Emma1, Today, 02:42 PM
                          1 response
                          17 views
                          0 likes
                          Last Post NinjaTrader_DrewO  
                          Started by fx.practic, Today, 03:10 PM
                          1 response
                          6 views
                          0 likes
                          Last Post NinjaTrader_Jesse  
                          Working...
                          X