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 Karado58, 11-26-2012, 02:57 PM
        8 responses
        14,825 views
        0 likes
        Last Post Option Whisperer  
        Started by Option Whisperer, Today, 09:05 AM
        0 responses
        1 view
        0 likes
        Last Post Option Whisperer  
        Started by cre8able, Yesterday, 01:16 PM
        3 responses
        11 views
        0 likes
        Last Post cre8able  
        Started by Harry, 05-02-2018, 01:54 PM
        10 responses
        3,204 views
        0 likes
        Last Post tharton3  
        Started by ChartTourist, Today, 08:22 AM
        0 responses
        6 views
        0 likes
        Last Post ChartTourist  
        Working...
        X