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

1st Hour High/Low

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

    #46
    Originally posted by Bdg820 View Post
    Hi Ray,

    I need help trying to figure out session high low. I need to able to have a start and end time, for the lines drawn. I want a high low of a chosen session and it to be ending at the end of the day.

    I been able to use two sessions using the instrument manager, but what I was looking for is the session high low lines to carry on to the next session.

    Thanks
    Something like an opening range indicator that plots the initial balance (first hour of regular trading) and the night session range?
    Attached Files

    Comment


      #47
      Hi Harry,

      Is there a way of plotting a ray line between to chosen times at the high everyday automatically.

      Thanks

      Comment


        #48
        Originally posted by Bdg820 View Post
        Hi Harry,

        Is there a way of plotting a ray line between to chosen times at the high everyday automatically.

        Thanks
        I do not understand your question. Could you please reformulate it?

        Comment


          #49
          Hello Bdg820,

          A ray line will be continuous when a line can have specific starting and ending coordinates. I would advise to use a Horizontal Line and then remove the drawing object when you are done using it. You can also just call the line below and it will change the drawing object tagged "My Horizontal Line" each time it is called. Therefore, if you call it once a day it will update that line once a day.

          NinjaTrader 7:
          Code:
          DrawHorizontalLine("My Horizontal Line" + CurrentBar, PriorDayOHLC().PriorHigh[0], Color.Blue);
          NinjaTrader 8:
          Code:
          Draw.HorizontalLine(this, @"My Horizontal Line", false, PriorDayOHLC().PriorHigh[0], Brushes.CornflowerBlue, DashStyleHelper.Solid, 2);
          Draw Objects can be manually removed with RemoveDrawObject()

          NinjaTrader 7 - http://ninjatrader.com/support/helpG...drawobject.htm
          NinjaTrader 8 - https://ninjatrader.com/support/help...drawobject.htm
          JimNinjaTrader Customer Service

          Comment


            #50
            Previous Hour High Low

            Originally posted by Harry View Post
            Something like an opening range indicator that plots the initial balance (first hour of regular trading) and the night session range?
            Hi,

            I've been searching for an indicator to just show the previous Hours high and low on the 5 minute chart extending into the current hour trading and then changing on the close of the hour. At the moment I'm changing the two horizontal lines manually at the end of each hour on 6 charts. Any help would be greatly appreciated.

            Comment


              #51
              Welcome to the forums SteveAU!

              I'm not sure of an indicator that does this exact task, but maybe another member of forums may know of one.

              If you would like to program this yourself, you could use an additional data series for the hourly high/low, and then incorporate time checks to draw a line between the 5 minute bar that opens a new hour and the current bar until the CurrentBar reaches the end of an hour. I'll include some resources to accomplish this below. The reference sample has additional information on the components used in the example.

              Working with Price Data - https://ninjatrader.com/support/help...rice_data2.htm
              Multi Series NinjaScripts (Important Read!) - https://ninjatrader.com/support/help...nstruments.htm
              Time filters example strategy - https://ninjatrader.com/support/foru...ead.php?t=3226
              DrawLine() - https://ninjatrader.com/support/help.../?drawline.htm

              Otherwise, we could we could have a representative of our EcoSystem provide additional information on NinjaScript Consultants who would be happy to make this script for you.

              If you would like us to provide any of that information for you, please let us know.
              JimNinjaTrader Customer Service

              Comment


                #52
                Hi,

                thanks for your reply. I'm looking for an indicator which shows lines across to the y axis with tags for the high and the low for the previous hour, 4 hour, daily, weekly and monthly. All of which update to the newest previous hour, 4 hour, daily, week, month once the current one has closed. Is that possible ?

                Kind Regards,
                Steve

                Comment


                  #53
                  Hello SteveAU,

                  Yes, this sort of script is possible to create.The information provided in my previous message could be referenced to construct an indicator that accomplishes that task. You could also use DrawRay instead of DrawLine.

                  DrawRay - https://ninjatrader.com/support/help...7/?drawray.htm

                  If you add a data series for each time frame you would like to check and then update each price level and barsAgo index for your DrawLines or DrawRays when that time frame's bar closes, you can achieve this result. The Multi Series NinjaScripts documentation provides a complete walk through for how you can create this logic.

                  I may suggest creating simple scripts that only create one or a few Lines or Rays so you can get more acquainted with the drawing methods and writing the correct syntax before incorporating the logic in a Multi Series NinjaScript.

                  If are looking for services to have someone write this indicator for you, I can have a representative of our EcoSystem provide you information on NinjaScript Consultants.

                  Could I confirm that you would like to create this yourself, or were you looking to have someone write this script for you?

                  Please let us know how we can assist you further.
                  JimNinjaTrader Customer Service

                  Comment


                    #54
                    Looking to create the variable First Thirty minute Low each session..


                    if (BarsInProgress == 1
                    && Bars.PercentComplete > 0.07407
                    && Bars.PercentComplete < 0.074072)

                    {
                    ESFTMFLOW = CurrentDayOHL(Lows[1]).CurrentLow[0];
                    }


                    But on doing a print check later in the session the variable prints 0..... thoughts why this might be the case? Does the variable only exist during that defined time window?

                    Regards

                    Comment


                      #55
                      Hello elliot5,

                      The 0 would indicate the value was not set when you printed it. Your variable will only be set when that condition happens so if you Print happened before the condition it would be 0. For this type of question you generally are going to need to use more Prints to find out what happened, likely adding a print before the condition will help. Printing the Bars.PercentComplete during BarsInProgress == 1 would be one way to see why the condition failed. Otherwise if the condition was true that would let you move to checking other items inside your condition like the value of the indicator to see if that is what is 0.

                      I look forward to being of further assistance.
                      JesseNinjaTrader Customer Service

                      Comment


                        #56
                        Perhaps to get the first half hour of session Hi/lo it would be easier to add a one minute series and use other logic.

                        Comment


                          #57
                          Originally posted by elliot5 View Post
                          Perhaps to get the first half hour of session Hi/lo it would be easier to add a one minute series and use other logic.
                          You would need to create an indicator that adds a secondary bar series of 1-minute data and that allows for setting both a start time and the duration for the opening period.
                          We have such an indicator available that plots the opening range for the first 30 minutes (or any period set in minutes or seconds). Opening time for the regular session is preset for most of the futures contracts. A sample chart is attached.
                          Attached Files

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by terofs, Yesterday, 04:18 PM
                          1 response
                          21 views
                          0 likes
                          Last Post terofs
                          by terofs
                           
                          Started by CommonWhale, Today, 09:55 AM
                          1 response
                          3 views
                          0 likes
                          Last Post NinjaTrader_Erick  
                          Started by Gerik, Today, 09:40 AM
                          2 responses
                          7 views
                          0 likes
                          Last Post Gerik
                          by Gerik
                           
                          Started by RookieTrader, Today, 09:37 AM
                          2 responses
                          12 views
                          0 likes
                          Last Post RookieTrader  
                          Started by alifarahani, Today, 09:40 AM
                          1 response
                          7 views
                          0 likes
                          Last Post NinjaTrader_Jesse  
                          Working...
                          X