• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

IHorizontalLine.Y coordinate for Right Axis

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

    IHorizontalLine.Y coordinate for Right Axis

    Hello,

    I'm using the VolumeUpDown indicator on a time based chart.

    I have the time bars hidden and the standard VolumeUpDown showing on the primary panel and the Volume "Scale Justified" to the Right axis.

    When I access the Y coordinate of a horizontal line I am not getting the value on the right axis, which is Volume and not Price.

    Is there a way to make this work?

    Thanks

    #2
    Hello Turtle Trader,

    Thank you for your post.

    Set the VolumeUpDown to AutoScale = True, then right click in the chart > select Data Series > set the Auto Scale option to False > OK.
    Patrick H.NinjaTrader Customer Service

    Comment


      #3
      reply

      Thank you.

      I tried that but it still does not give me the Y coordinate for VolumeUpDown

      Perhaps there are other settings I need to tweak?

      Comment


        #4
        Hello Turtle Trader,

        Thank you for your response.

        Can you provide a screenshot of what you are seeing and what you are trying to obtain here?
        Patrick H.NinjaTrader Customer Service

        Comment


          #5
          screen shot attached

          in this case I would like the IHorizontalLine.Y coordinate to return 1200

          I am able to set AutoScale on the instrument once somehow, but when I go back and check it, it is greyed out and I cannot change it.

          I am printing the Y coordinate given to the Output window and it is not what is on the Y axis on the chart...usually it is a small decimal number.
          Attached Files

          Comment


            #6
            Are you just looking for an axis marker to show where your horizontal line is? You will need a plot to do that. Assign a plot to that number and make it some small dot or hash and on each new bar just reset the previous bar plot and plot the current bar plot.
            Here a plot, there a plot, everywhere a plot plot!

            Dan
            eDanny
            NinjaTrader Ecosystem Vendor - Integrity Traders

            Comment


              #7
              line is manually drawn

              The line is not a plot...it is drawn manually. I add, move, or delete these manually drawn lines, just like on a price chart.

              The indicator needs to know the line, which it can do in Ninja 7, and access its attributes.

              Y is one of the attributes of IHorizontalLine and it is not returning the correct number of the Y axis on the right side.

              Comment


                #8
                I see, my mistake.

                Dan
                eDanny
                NinjaTrader Ecosystem Vendor - Integrity Traders

                Comment


                  #9
                  ...........

                  no mistake, just a different viewpoint
                  :-)

                  Comment


                    #10
                    Hello Turtle,

                    Thank you for your response.

                    I am not sure why the Y value should be 1200 if you manually drew the line. Can you provide a code snippet to illustrate your point?
                    Patrick H.NinjaTrader Customer Service

                    Comment


                      #11
                      code

                      foreach (IDrawObject draw in DrawObjects)
                      {
                      if (draw.UserDrawn && draw.DrawType == DrawType.HorizontalLine)
                      {
                      ILine ThisLine = (ILine) draw;
                      IHorizontalLine HLine = (IHorizontalLine) ThisLine;

                      Print (HLine.Y.ToString());

                      }
                      }

                      ================================================== ===========

                      Do you see where the black hand drawn horizontal line intersects the right Y axis...more or less 1200? It is that value I am looking for.

                      Comment


                        #12
                        Hello Turtle Trader,

                        Thank you for your response.

                        I have created a video on this item, please let me know if you have any questions: http://screencast.com/t/j1Ksii76kfB
                        Patrick H.NinjaTrader Customer Service

                        Comment


                          #13
                          Thanks

                          Hi Patrick,

                          Yes what you do is working.

                          I was loading the indicators with a chart template and evidently something was haywire in the template, though it was working good without this new indicator.

                          Also, I was not able to set the Data Series.Auto Scale to false. It was locked to true.

                          But if I add the indicator, then go back I can change the AutoScale on the DataSeries. Could not do that before for some reason.

                          this is now working with one instrument on the panel. My goal is to get it working with 4 instruments on one panel...so it should scale up there.

                          Thank you!

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by shdbgvfhjf, Today, 05:57 AM
                          0 responses
                          4 views
                          0 likes
                          Last Post shdbgvfhjf  
                          Started by stefanrvc, Today, 04:59 AM
                          1 response
                          11 views
                          0 likes
                          Last Post NinjaTrader_Marco  
                          Started by 7robert, Yesterday, 08:30 PM
                          2 responses
                          16 views
                          0 likes
                          Last Post NinjaTrader_Marco  
                          Started by pjsmith, Today, 01:13 AM
                          1 response
                          15 views
                          0 likes
                          Last Post NinjaTrader_ChrisSch  
                          Started by yukashg, Yesterday, 09:56 PM
                          1 response
                          15 views
                          0 likes
                          Last Post NinjaTrader_ChrisSch  
                          Working...
                          X