Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Session midpoint indicator

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

    Session midpoint indicator

    Attached is a simple midpoint indicator which dynamically draws a midpoint line - to watch the 50% retracement.

    My problem is Ideally I would like an indicator that calculates from the 9:30 open as I have a 24 hour 1min ES chart.

    I set the Session begins and End to 4:15pm so that I can use the PriorDayOHLC indicator. Changing session begins and end to 9:30am stuffs up the PriorDayOHLC indicator (the 4:15 close).

    I'm a new NT user so does anybody have suggestions, tips etc.

    TIA
    Attached Files

    #2
    Could you clarify?

    - You want to plot on a 24 hour chart but calculate data based on a defined session or;

    - Plot on a chart with a defined session but calculate off of 24 hour data?

    If the latter, this is not possible.
    RayNinjaTrader Customer Service

    Comment


      #3
      Hi Ray

      Firstly slightly different question, which may help with my middle indicator
      Futures traders commonly want to show yesterdays High, Low and close (4:15pm) on a 24hr chart. Can this be done? If I define session is 9:30 to 4:15, I cannot display globex data. This must be a common question?

      "- Plot on a chart with a defined session but calculate off of 24 hour data"

      This picture is what I ideally want, of an indicator I dont have access to (the lines mainly). I added the 50% line, considering they calculated the OR (open range) lines it must be possible to calculate and draw a 50% of current range line (9:30:to 4:15pm)

      If anybody knows of some way of coding something similar or one I could purchase please let me know.
      Attached Files

      Comment


        #4
        If I use the code


        if (ToTime(Time[0])>=093000 && ToTime(Time[0])<161500)
        {
        High[y]; ///how to get the highest high during the period?
        }

        Then I could draw a horizontal line, but how could I reference the X points on the chart for the start and end times of the line? (ToTime(Time[0])>=093000 && ToTime(Time[0])<161500)

        Comment


          #5
          Hi Brutus,

          To get the highest high you will want to use MAX(High, 20)[0] or something like that at the end of the time period. You need to calculate how many bars are included in your specific time period to pass in for the period parameter.
          Josh P.NinjaTrader Customer Service

          Comment


            #6
            I would like to know how I can get a midpoint line that draws the middle between Prior Day High and Prior Day Low.

            Thanks,

            PEDRO

            Comment


              #7
              Originally posted by [email protected] View Post
              I would like to know how I can get a midpoint line that draws the middle between Prior Day High and Prior Day Low.

              Thanks,

              PEDRO
              You could take the PriorDayOHLC indicator that comes with NinjaTrader and modify the code. You need to add new variables "currentMidline", "priordayMidline" and "showMidline", add a new plot for the Midline, create properties for "showMidline" and the new plot and then modify the code accordingly.

              There are also two indicators available which plot the midline:

              -> the SessionPivotsV42 package (use anaPivotsDailyV42, the plot labeled CP is the prior day's midline)



              -> the FibsFromPriorSessionV42 package

              The best futures trading community on the planet: futures trading, market news, trading charts, trading platforms, trading strategies


              Attached is a chart of the FibsFromPriorDayV42 indicator. Plots not needed can be disabled. The package also contains the midline of the prior week and prior month.
              Attached Files

              Comment


                #8
                Hello pedroprada,

                Thank you for your post and thank you to Harry for their assistance.

                You can just create a new indicator and use the DrawHorizontalLine() method to draw this mid point:
                Code:
                DrawHorizontalLine("Mid", PriorDayOHLC().PriorLow[0] + (PriorDayOHLC().PriorHigh[0] - PriorDayOHLC().PriorLow[0]), Color.Blue);

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by SantoshXX, Today, 03:09 AM
                0 responses
                6 views
                0 likes
                Last Post SantoshXX  
                Started by DanielTynera, Today, 01:14 AM
                0 responses
                2 views
                0 likes
                Last Post DanielTynera  
                Started by yertle, 04-18-2024, 08:38 AM
                9 responses
                41 views
                0 likes
                Last Post yertle
                by yertle
                 
                Started by techgetgame, Yesterday, 11:42 PM
                0 responses
                12 views
                0 likes
                Last Post techgetgame  
                Started by sephichapdson, Yesterday, 11:36 PM
                0 responses
                2 views
                0 likes
                Last Post sephichapdson  
                Working...
                X