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

Plot Lines

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

    Plot Lines

    Hello,
    Can someone help me with setting up an indicator to do the following.
    -Plot 2 horizontal lines - both an overnight high and overnight low (in between market close and open)
    -Plot 2 horizontal lines - first hour high and a first hour low (first hour the market is open)
    -Plot two more Horizontal user defined lines.

    Any help would greatly be appreciated.

    #2
    Hello,

    I recommend giving it a try in our strategy wizard:


    If you get stuck provide us with a screen shot of your set up and we will assist.
    DenNinjaTrader Customer Service

    Comment


      #3
      Am I looking for a strategy or indicator?

      Comment


        #4
        Hello,

        You will need to build this as a strategy, but instead of orders you will use drawings. I recommend going through the tutorials first.
        DenNinjaTrader Customer Service

        Comment


          #5
          So this is my attempt at drawing the high between 630 and 730pst. How would I adjust this so that only 1 line is drawn for that time period.
          Attached Files

          Comment


            #6
            You may need to unlock your code and change the signal name of the horizontal line. You don't want it to be a unique name. You just want one line that updates so you want to pass in one name.

            DrawHorizontalLine("My horizontal line", High[0], Color.Blue);

            Notice the removal of the + CurrentBar part.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              Plot Lines NT vs Esig

              I am trying to do a similar thing, I want lines to be drawn for entries and exits on my strategy. I have attached a sample from esignal -

              Problem - How to draw a horizontal line that continues until price crosses it.

              In NT Indicator - When you draw Horizontal Line, the line only lasts for that specific tick/bar - and you have to draw it again for subsequent bars. This poses the problem, when you are using the same name for the bar in a loop etc.

              Is this even possible on an indicator, or do you have to use a strategy to accomplish this.

              Thanks in advance.

              Simon
              Attached Files

              Comment


                #8
                gaatr,

                It is possible. I suggest you just use a plot with a style of dash. Then just set the plot to take the value you want for each bar. If you keep setting it to the same value it will end up drawing a horizontal line segment.

                Alternatively you may want to use DrawLine() or any of the other draw methods available to you. Play around with it. See what works for you. You do not need a strategy to do chart plotting.
                Josh P.NinjaTrader Customer Service

                Comment


                  #9
                  Plot Lines

                  Thanks Josh. I will play around with it, thanks for the quick response.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Segwin, 05-07-2018, 02:15 PM
                  14 responses
                  1,789 views
                  0 likes
                  Last Post aligator  
                  Started by Jimmyk, 01-26-2018, 05:19 AM
                  6 responses
                  837 views
                  0 likes
                  Last Post emuns
                  by emuns
                   
                  Started by jxs_xrj, 01-12-2020, 09:49 AM
                  6 responses
                  3,293 views
                  1 like
                  Last Post jgualdronc  
                  Started by Touch-Ups, Today, 10:36 AM
                  0 responses
                  13 views
                  0 likes
                  Last Post Touch-Ups  
                  Started by geddyisodin, 04-25-2024, 05:20 AM
                  11 responses
                  63 views
                  0 likes
                  Last Post halgo_boulder  
                  Working...
                  X