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

Horizontal line at specific time

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

    Horizontal line at specific time

    I'd like to plot a horizontal line at the cash open 9:30 AM EST.

    Been doing this manually. Can you point me to an indicator that I could copy some code from?

    The OHL confused the heck out of me.

    I'd like it to plot across the screen starting at 9:30 EST bar open and then be cleared at closed for the next day...and start over. Is that even possible?

    Thanks,

    V.

    #2
    VinnyB, you can start with this and check if suits your needs, apply the CurrentDayOHL indicator to your chart. Then double click on the chart and the session begin time to start at your 9:30 cash market open time. This will give you the needed reference lines throughout the day.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Bertrand,

      This sort of works.

      It paints a line but drags it from previous day and I had to set the session to 9:30.

      I thought I could do something like:

      1. At 9:30 AM, draw a horizontal line that will continue through day.
      2. Have it terminate at close.
      3. New line start next morning at 9:30 AM

      For any time frame and without having to change session time in properties.

      Any ideas?

      Or an indicator that has this type of code that I could snipe?

      Thanks,

      v.

      Comment


        #4
        You can defnitely arrive at such an indicator with custom coding, using the DrawLine or DrawHorizontalLine methods - http://www.ninjatrader-support.com/H.../DrawLine.html



        Unfortunately I'm not aware of a readymade script for this.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Thanks B!!

          Comment


            #6
            Originally posted by VinnyB View Post
            I'd like to plot a horizontal line at the cash open 9:30 AM EST.

            Been doing this manually. Can you point me to an indicator that I could copy some code from?

            The OHL confused the heck out of me.

            I'd like it to plot across the screen starting at 9:30 EST bar open and then be cleared at closed for the next day...and start over. Is that even possible?

            Thanks,

            V.
            Vinny,
            See if the attached code can help. Maybe you can modify it to do what you want. This code plot a horizontal line at the midpoint of the 9:32 bar on a 2 min chart.
            Attached Files

            Comment


              #7
              Thanks Jabez - very kind of you!

              I'll check it out later today and let you know how I make out.

              Thanks again,

              V.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by gm7_forum, Today, 05:51 PM
              0 responses
              2 views
              0 likes
              Last Post gm7_forum  
              Started by cre8able, Today, 03:20 PM
              1 response
              9 views
              0 likes
              Last Post cre8able  
              Started by fiddich, Today, 05:25 PM
              0 responses
              3 views
              0 likes
              Last Post fiddich
              by fiddich
               
              Started by gemify, 11-11-2022, 11:52 AM
              6 responses
              804 views
              2 likes
              Last Post ultls
              by ultls
               
              Started by ScottWalsh, Today, 04:52 PM
              0 responses
              4 views
              0 likes
              Last Post ScottWalsh  
              Working...
              X