Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Session Rectangles with Max/Min Price

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

    Session Rectangles with Max/Min Price

    Hello, there is an indicator to draw rectangles with the sessions and get max an min price on each session?
    - Asian
    - Franjfurt
    - London
    -NY
    etc
    thank you

    #2
    The topic you originally posted under had to do with the time zone and date selection behavior of the NinjaTrader 8 Trade Performance window. Your question seems to be about charting. I've moved your post to its own topic. In the future, please create a new topic if you can't find an existing topic with the exact same issue or question.

    If I understand you correctly, you'd like a rectangle to be drawn on your chart that extends to the maximum price and minimum price reached during a specific set of hours? If this is correct, could you please define each of the 'sessions' you're referring to? Please give a start time, end time, and time zone so we can be sure we're on the same page about what you're requesting.

    If I've made an incorrect assumption, please elaborate further on what you're trying to accomplish.

    Comment


      #3
      Hello Patrick.
      Yes, we are on the same page.
      I want to surround in a rectangle every bars that was generated in a specific time range.
      For example, in the asian session (market ours of asia), surround that bars with a rectangle, so i can see this on my chart and easily get max and min prices on this rectangle,
      Im attaching an example.
      I need to develop an indicator for this with ninja script.
      Thank you so much
      Regards

      Attached Files

      Comment


        #4
        Hello fscabrera03,

        Thanks for your reply.

        There is an indicator that can be used to draw those price time-based rectangles. I'll link the indicator below and here is a screenshot of it applied to a chart when the type "DynamicRange" is selected. The second screenshot shows the same but using "Opening Range" which provides horizontal high low lines to the end of the session. The indicator allows up to 10 events per day. They can be repeated daily or on selected days.

        The indicator does not provide the high and low price of the range so if you are looking for that from a Ninjascript perspective you would need to create an indicator to do that.

        Click image for larger version

Name:	fscabrera03-1.PNG
Views:	1326
Size:	90.8 KB
ID:	1145993

        Click image for larger version

Name:	fscabrera03-2.PNG
Views:	1216
Size:	90.6 KB
ID:	1145994


        This indicator is publicly available on our NinjaTrader Ecosystem website:
        Here is a basic guideline of how to import NinjaScript add-ons in NinjaTrader 8:

        Note — 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 'Available' list on the left > Add > OK

        Here is a short video demonstration of the import process:
        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.

        Paul H.NinjaTrader Customer Service

        Comment


          #5
          Thank you so much!
          So... that indicator is good to see in chart, but i cant acces bar information on each area.
          Do you know a way to get bars between a range of time? so i can iterate each of these bars and have max and mins of the range

          Comment


            #6
            Hello fscabrera03,

            Thanks for your reply.

            You can create an indicator that you can create a time filter (for each time section you wish) and when the bar's close time matches the time filter range, you can then compare the High and low of the bar to see if they are greater/lesser than the previous values and if so then store the new high or new low. Once the last bar has been processed the variables would hold the zones high and low values.

            For example:

            if ((Times[0][0].TimeOfDay >= new TimeSpan(7, 30, 0)) && (Times[0][0].TimeOfDay <= new TimeSpan(10, 0, 0))) // if the bar close time is between 7:30 and 10:00
            {
            if (High[0] > zoneHigh)
            {
            zoneHigh = High[0]; // store the new high
            }
            if (Low[0] < zoneLow)
            {
            zoneLow = Low[0]// store the new low
            }
            }

            After 10:00 AM in this case zoneHigh and zoneLow would hold the high and low of the period.

            Note that you would want to seed the double variables zoneHigh and zoneLow with some values either before the above code or within the code by checking a bool to see if it is the first time in the zone in which case you simply set the first value from the first bar in the zone.
            Paul H.NinjaTrader Customer Service

            Comment


              #7
              #fscabrera03 attached is an example of how I use Paul's Repeater indicator in conjunction with Current and Prior day OHL indicators to show Session Ranges and trading periods I am interested in (and Opening Range on lower timeframe)

              If you produce a Min/Max indicator as discussed, I would be interested and most grateful if you were to send me or post to the User-shared Ecosystem as doing so is beyond my coding abilities or desires ;-)

              .Kind regards,
              Attached Files

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by GussJ, 03-04-2020, 03:11 PM
              16 responses
              3,281 views
              0 likes
              Last Post Leafcutter  
              Started by WHICKED, Today, 12:45 PM
              2 responses
              19 views
              0 likes
              Last Post WHICKED
              by WHICKED
               
              Started by Tim-c, Today, 02:10 PM
              1 response
              9 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by Taddypole, Today, 02:47 PM
              0 responses
              5 views
              0 likes
              Last Post Taddypole  
              Started by chbruno, 04-24-2024, 04:10 PM
              4 responses
              53 views
              0 likes
              Last Post chbruno
              by chbruno
               
              Working...
              X