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 for NT8

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

    Open-Range indicator for NT8

    Hi all,

    I am looking for an indicator that will allow me to set a pre-defined time range eg. 11:00 to 13:00 o'clock (11am to 01pm in american format) and which in result will plot in a rectangular/box/shape or similar the highs and lows that were reached during this range. That area within the given time-range should be filled with a pre-defined color and transparency to have a good visability inside the chart. The evaluated high/low should extend as horizontal lines. The delta between high and low should be calculated. Then plot additionally a horizontal line under and above that open-range with a pre-defined factor/multiplier. Let's say the high was 3500 and the low was 3450, so the delta is 50. When I enter factor/multiplier=1.0 the upper horizontal line should be plotted at 3550 and the lower line at 3400. When I enter factor=0.7 (50*0.7=35) the upper line should be plotted at 3535 and the lower line at 3415.

    Here's an example screenshot where multi=1.0

    Click image for larger version

Name:	example.png
Views:	5298
Size:	141.0 KB
ID:	1119412

    It should be possible to choose the color and transparency for the upper and lower range lines and the fill area for the time range. I have no clue where to start or how to code such an indicator on my own. I am asking if anyone is aware of an existing indicator like that and where I can download it. Otherwise I am kindly asking if anyone of you pro's are able to code such an indicator if it's not too difficult and time-consuming.

    Appreciate any assistance. Thanks a lot in advance
    Patricia

    #2
    Hello patricia70,

    Thanks for your post.

    I am not aware of an indicator that will meet all of your needs, however, there are 3 indicators that are freely available in the NT user apps section of the NinjaTrader ecosystem that provide an "Opening range" type function. Perhaps one of these will be helpful or provide a starting point to create your own.


    This indicator is publicly available on our NinjaTrader Ecosystem website:
    Here is a basic guideline of how to Import NinjaScripts.

    To import NinjaScripts you will need the original .zip file.

    To Import
    1. Download the NinjaScripts to your desktop, keep them in the compressed .zip file.
    2. From the Control Center window select the menu Tools>Import>Ninjascript add-on..
    3. Select the downloaded .zip file
    4. NinjaTrader will then confirm if the import has been successful.
    Critical - Specifically for some NinjaScripts, it will prompt that you are running newer versions of @SMA, @EMA, etc. and ask if you want to replace, press 'No'

    Once installed, you may add the indicator to a chart by:
    • Right click your chart > indicators > Select the Indicator from the list on the left > New > OK
    The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The add-ons listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.

    If none of these meet your needs, another alternative would be to use the services of a professional programmer and we can provide a link to 3rd party programmers in the Ninjatrader ecosystem that can provide that custom service.
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Hello Paul,

      thank you so much for pointing to that indicators. All of them provide one or more of those feautures I requested, what a pity they are not combined can you point me to the right direction how to start to learn programming indicators and strategies for Ninjatrader? I am aware about the online help when pressing F1 but I'd rather like to see some videos/tutorials or step-by-step beginning basic primers.

      Any clues?

      thanks a lot.
      Patricia

      Comment


        #4
        Hello patricia70,

        Thanks for your reply.

        Ninjascript provides methods and properties to assist you with your trading, be it indicator, strategies or add-ons. Ninjascript is based on C# programming language so the syntax rules of C# are applicable. Leaning C# would be very helpful and there are any number of on-line free resources.

        I would suggest checking out this post https://ninjatrader.com/support/foru...pt#post1044239

        You may want to also perform an internet search for "Learn NinjaTrader8 Ninjascript" as this can provide other sources that may be helpful.
        Paul H.NinjaTrader Customer Service

        Comment


          #5
          Hi PaulH,
          For the case you mentioned from the web
          Multi functional repeater of up to 10 X and/or Y Highlight regions daily or day of week. User interface expands for up to 10 events. Each event configurable as a time region, price region, fixed rectangle or dynamic rectangle (adjusts on price), select a day of the week or daily. Here is a quick video […]


          For that case, how can I apply to the strategy with getting or calling the values for the (upper) line and (lower ) line, any idea for the application for that indicator using in strategy?

          Thanks
          Sst

          Comment


            #6
            Hello stantenlee,

            Thank you for your note.

            The Repeater indicator is primarily a visual tool. As such, it draws a number of drawing objects to the chart but does not expose the values as plots, which means you would need to cycle through all the drawing objects on the chart, find the most recent lines drawn, and obtain the Y values for those objects.

            This could not be done in a Strategy Builder strategy, you would need to manually code that logic. This would require fairly advanced skill and there's likely indicators out there that would be simpler to use for essentially the same purpose.

            Please see the help guide here for an example of looping through drawing objects: https://ninjatrader.com/support/help...rawobjects.htm

            Please let us know if we may be of further assistance to you.
            Kate W.NinjaTrader Customer Service

            Comment


              #7
              Hi Kate,

              Code:
              if (DrawObjects.Count > 0) { foreach (DrawingTool draw in DrawObjects.ToList()) { if (draw is DrawingTools.Rectangle ) { Print ("Tag name: "+draw.Tag); DrawingTools.Rectangle temp = draw as DrawingTools.Rectangle; Print("startYPrice: " + temp.StartAnchor.Price); Print("startXTime: " + temp.StartAnchor.Time); Print("endYPrice: " + temp.EndAnchor.Price); Print("endXTime: " + temp.EndAnchor.Time); } } }

              Knowing you are talking about this code, these code should be added to code in strategy part or indicator part?

              Comment


                #8
                Hello stantenlee,

                Thank you for your reply.

                You would not be modifying the indicator, you would be looping through the drawing objects within the strategy when the indicator is applied to the chart, most likely within OnBarUpdate.

                Please let us know if we may be of further assistance to you.
                Kate W.NinjaTrader Customer Service

                Comment


                  #9
                  Originally posted by patricia70 View Post
                  Hi all,

                  I am looking for an indicator that will allow me to set a pre-defined time range eg. 11:00 to 13:00 o'clock (11am to 01pm in american format) and which in result will plot in a rectangular/box/shape or similar the highs and lows that were reached during this range. That area within the given time-range should be filled with a pre-defined color and transparency to have a good visability inside the chart. The evaluated high/low should extend as horizontal lines. The delta between high and low should be calculated. Then plot additionally a horizontal line under and above that open-range with a pre-defined factor/multiplier. Let's say the high was 3500 and the low was 3450, so the delta is 50. When I enter factor/multiplier=1.0 the upper horizontal line should be plotted at 3550 and the lower line at 3400. When I enter factor=0.7 (50*0.7=35) the upper line should be plotted at 3535 and the lower line at 3415.

                  Here's an example screenshot where multi=1.0

                  Click image for larger version

Name:	example.png
Views:	5298
Size:	141.0 KB
ID:	1119412

                  It should be possible to choose the color and transparency for the upper and lower range lines and the fill area for the time range. I have no clue where to start or how to code such an indicator on my own. I am asking if anyone is aware of an existing indicator like that and where I can download it. Otherwise I am kindly asking if anyone of you pro's are able to code such an indicator if it's not too difficult and time-consuming.

                  Appreciate any assistance. Thanks a lot in advance
                  Patricia

                  Hi Patricia,
                  this indicator does exactly what you are looking for:





                  Best regards
                  Martin

                  Comment


                    #10
                    PaulH in the download links for the 3 options I do not see one with name "Open Range" (I have this in my platform, I just do not know if it is part of Ninja or is third party) Different from the "Open Range Indicator" it is more simple but I always refer to indicators without the ability to use in a strategy as lacking needed plots to actually put the indicator to useful trading applicatons

                    Was wondering if the Open Range was a Ninja Standard indicator

                    Comment


                      #11
                      This is a conversion of the Opening Range 4 indicator developed and originally coded for the NinjaTrader 7 platform by sh_daggett. 8/26/2021: Added NinjaScriptProperty attribute to public properties so they can be used in Strategy Builder. Please contact the original author for any questions or comments.


                      I believe this meets my needs

                      Thank you​

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by bortz, 11-06-2023, 08:04 AM
                      47 responses
                      1,611 views
                      0 likes
                      Last Post aligator  
                      Started by jaybedreamin, Today, 05:56 PM
                      0 responses
                      9 views
                      0 likes
                      Last Post jaybedreamin  
                      Started by DJ888, 04-16-2024, 06:09 PM
                      6 responses
                      19 views
                      0 likes
                      Last Post DJ888
                      by DJ888
                       
                      Started by Jon17, Today, 04:33 PM
                      0 responses
                      6 views
                      0 likes
                      Last Post Jon17
                      by Jon17
                       
                      Started by Javierw.ok, Today, 04:12 PM
                      0 responses
                      22 views
                      0 likes
                      Last Post Javierw.ok  
                      Working...
                      X