Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Box and Color Session Times w/ Height = High and Low of Session

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

    Box and Color Session Times w/ Height = High and Low of Session

    Hello--

    Does anyone know how I might code an indicator that would place a box around the bars within a session, with the left side of the box being equal to the session start time, the right side of the box being the current time of the session end time, the top of the box being the session high and the bottom of the box being the session low? I would then like to color the box with an opacity.

    Thanks for your help. I REALLY appreciate it.

    All best,

    Aventeren

    #2
    Hello Aventeren,

    Thank you for your post.

    The box will be drawn with the DrawRectangle() method, you will want to use the DateTime syntax listed at the following link: http://www.ninjatrader.com/support/h...wrectangle.htm
    For the session begin and end times you will need to use Bars.Session.GetNextBeginEnd() method: http://www.ninjatrader.com/support/h...xtbeginend.htm

    Please let me know if you have any questions.

    Comment


      #3
      Perfect; thanks.

      One other question, if I wanted to draw the size of the range (range high - range low) just underneath the range low, what are my Draw Text options and which text option do you like to use?

      Thanks,

      Aventeren

      Comment


        #4
        Hello Aventeren,

        You can use DrawText() and specify the Y value and where you will place the text.
        DrawText("myText" + CurrentBar, "Text that needs to be drawn", BarsAgo, Y-Value, Color)

        http://www.ninjatrader.com/support/h...l?drawtext.htm
        Cal H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by futtrader, 04-21-2024, 01:50 AM
        4 responses
        41 views
        0 likes
        Last Post futtrader  
        Started by Option Whisperer, Today, 09:55 AM
        1 response
        11 views
        0 likes
        Last Post bltdavid  
        Started by port119, Today, 02:43 PM
        0 responses
        1 view
        0 likes
        Last Post port119
        by port119
         
        Started by Philippe56140, Today, 02:35 PM
        0 responses
        3 views
        0 likes
        Last Post Philippe56140  
        Started by 00nevest, Today, 02:27 PM
        0 responses
        2 views
        0 likes
        Last Post 00nevest  
        Working...
        X