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

Vertical Line at specific time

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

    Vertical Line at specific time

    Hi, I need to draw a vertical line at specific time every single day, is there a way to do it without an indicator or should I program one?

    Thanks!!

    #2
    Hello voltation,

    Thanks for your post.

    This would require custom coding to accomplish your goal.

    In the NT user apps section of the Ninjatrader ecosystem, there is an indicator that you can freely download and use that draws a vertical line at your specified time.

    This indicator is publicly available on our NinjaTrader Ecosystem website:
    Here is a basic guideline of how to Import NinjaScripts.

    To import NinjaScripts you will need the original .zip file.

    To Import
    1. Download the NinjaScripts to your desktop, keep them in the compressed .zip file.
    2. From the Control Center window select the menu Tools>Import>Ninjascript add-on..
    3. Select the downloaded .zip file
    4. NinjaTrader will then confirm if the import has been successful.

    Critical - Specifically for some NinjaScripts, it will prompt that you are running newer versions of @SMA, @EMA, etc. and ask if you want to replace, press 'No'

    Once installed, you may add the indicator to a chart by:
    • Right click your chart > indicators > Select the Indicator from the list on the left > New > OK

    The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The add-ons listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Hi Paul, it worked nice. Thanks!!!!

      Comment


        #4
        Originally posted by NinjaTrader_PaulH View Post
        Hello voltation,

        Thanks for your post.

        This would require custom coding to accomplish your goal.

        In the NT user apps section of the Ninjatrader ecosystem, there is an indicator that you can freely download and use that draws a vertical line at your specified time.

        This indicator is publicly available on our NinjaTrader Ecosystem website:
        Here is a basic guideline of how to Import NinjaScripts.

        To import NinjaScripts you will need the original .zip file.

        To Import
        1. Download the NinjaScripts to your desktop, keep them in the compressed .zip file.
        2. From the Control Center window select the menu Tools>Import>Ninjascript add-on..
        3. Select the downloaded .zip file
        4. NinjaTrader will then confirm if the import has been successful.

        Critical - Specifically for some NinjaScripts, it will prompt that you are running newer versions of @SMA, @EMA, etc. and ask if you want to replace, press 'No'

        Once installed, you may add the indicator to a chart by:
        • Right click your chart > indicators > Select the Indicator from the list on the left > New > OK

        The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The add-ons listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.
        Hi Paul,

        When I applied the indicator, my horizontal and vertical grid lines went missing. How to fix?

        -Anna

        Comment


          #5
          Hello narese13,

          Thanks for your post.

          It looks like the indicator author has set the properties of the indicator to not draw horizontal and vertical gridelines. If you remove the indicator from the chart the gridlines should return.

          You may want to contact the indicator author if you would like that behavior changed.

          If you want to change the indicator to prevent that, you would need to edit the indicator with New>Ninjascript editor and then select indicators folder and then select the indicator BzvVerticalLineAtTimeV1

          Once the code is open in the code window, change the two properties:

          DrawHorizontalGridLines = false;
          DrawVerticalGridLines = false;

          by replacing the word false with true

          Then right mouse click and select "Compile.."

          When you then apply the indicator to a chart it will not remove the gridlines.
          Paul H.NinjaTrader Customer Service

          Comment


            #6
            Originally posted by NinjaTrader_PaulH View Post
            Hello narese13,

            Thanks for your post.

            It looks like the indicator author has set the properties of the indicator to not draw horizontal and vertical gridelines. If you remove the indicator from the chart the gridlines should return.

            You may want to contact the indicator author if you would like that behavior changed.

            If you want to change the indicator to prevent that, you would need to edit the indicator with New>Ninjascript editor and then select indicators folder and then select the indicator BzvVerticalLineAtTimeV1

            Once the code is open in the code window, change the two properties:

            DrawHorizontalGridLines = false;
            DrawVerticalGridLines = false;

            by replacing the word false with true

            Then right mouse click and select "Compile.."

            When you then apply the indicator to a chart it will not remove the gridlines.
            It works! Thank you!

            Comment


              #7
              Hi PaulH,


              I downloaded the above indicator and changed 'false' to 'true' so I could have the horizontal and vertical grid lines on my price graph. Thank you!!! Please see my pic below. The red line on the right is the EOD trading hours break line that runs down the entire chart. The blue line on the left is the line from the above indicator. I'd like the blue vertical line from the above indicator to run down the entire chart like the EOD break line. Can you provide any guidance on how I can make additional changes via NinjaScript Editor to edit this indicator so its vertical line can run down the entire chart?​
              Attached Files

              Comment


                #8
                Hello Ttrade12,

                That is not possible with drawing objects but you could use BackBrushAll instead of a drawing object to color the background of a specific bar and that will color all panels.



                JesseNinjaTrader Customer Service

                Comment


                  #9
                  Thanks, Jesse. I'll work on this.

                  Comment


                    #10
                    Hi Jesse,

                    I tried to create vertical lines in the Strategy Builder using the brush when it is 6:30a, but no vertical line shows up on the chart. The pics are below. Can you tell me what I'm doing wrong?

                    Attached Files

                    Comment


                      #11
                      Hello Ttrade12,

                      Add Misc > Current bar to the Tag so this is unique if you would like to see multiple objects drawn.


                      The code you have would modify the existing object to move this to the new bar as long as the time of the bar is greater than 6:30. Were you intending to use Equal instead of Greater equal so it would be only on the 6:30 bar?

                      May I confirm there is a bar close with the exact time of 6:30:00? (And not 6:30:01 or some other time that is not exactly 6:30:00?)

                      Please provide a screenshot of the chart with the strategy enabled, and the Data box open with the mouse hovering over the 6:30 bar so that we may confirm the bar close time.
                      Chelsea B.NinjaTrader Customer Service

                      Comment


                        #12
                        Hi Jesse,


                        I watched the video above. Thanks. I added Misc > Current Bar to the Tag. You are correct. I want equal and not greater equal. I changed it to equal, but the vertical line still doesn't show up. The times are 06:30:01, 06:30:04, 06:30:10, etc but the vertical line doesn't show up on the 6:30:01 bar. What am I doing wrong? Please see pics below. Thanks for your help.
                        Attached Files

                        Comment


                          #13
                          Oops, I didn't provide the correct chart screenshot....one second...

                          Comment


                            #14
                            Ok, below is the pic of the chart screenshot with the Data box open showing the 06:30:01 bar.
                            Attached Files

                            Comment


                              #15
                              Hello Ttrade12,

                              The object would not show on the 6:30:01 bar because the time of that bar does not equal 63000.

                              Do you want to draw on any bar within the first minute perhaps?

                              You could use time series, greater equal, time value > 6:30 and time series, less equal, time value > 6:31.
                              Chelsea B.NinjaTrader Customer Service

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by oneybuchi2, Today, 03:48 PM
                              0 responses
                              3 views
                              0 likes
                              Last Post oneybuchi2  
                              Started by Graci117, 06-19-2024, 01:39 PM
                              6 responses
                              52 views
                              0 likes
                              Last Post Graci117  
                              Started by farawayz, Today, 01:20 PM
                              0 responses
                              11 views
                              0 likes
                              Last Post farawayz  
                              Started by rjm1903, Today, 01:10 PM
                              0 responses
                              6 views
                              0 likes
                              Last Post rjm1903
                              by rjm1903
                               
                              Started by AH369, 06-21-2024, 11:09 AM
                              3 responses
                              21 views
                              0 likes
                              Last Post AH369
                              by AH369
                               
                              Working...
                              X