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 wzgy0920, 04-20-2024, 06:09 PM
        2 responses
        26 views
        0 likes
        Last Post wzgy0920  
        Started by wzgy0920, 02-22-2024, 01:11 AM
        5 responses
        32 views
        0 likes
        Last Post wzgy0920  
        Started by wzgy0920, Yesterday, 09:53 PM
        2 responses
        49 views
        0 likes
        Last Post wzgy0920  
        Started by Kensonprib, 04-28-2021, 10:11 AM
        5 responses
        192 views
        0 likes
        Last Post Hasadafa  
        Started by GussJ, 03-04-2020, 03:11 PM
        11 responses
        3,234 views
        0 likes
        Last Post xiinteractive  
        Working...
        X