• 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

Draw a line at a 45 degree angle...

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

    Draw a line at a 45 degree angle...

    Looking for help in drawing a line at a 45 degree angle given just a starting point. eg: Low[x] then just calculate the 45 degree angle to, eg: CanvasRight for example. I realize this is probably "unsupported", any help from the C# programmers would be greatly appreciated.

    #2
    Hello funk101,

    Basically, you would to start out by using some Geometry to be able to calculate 2nd Point from the point you would like to start at given and the desired angle.

    Here is a good thread that talks about how this can be accomplished that you may view.
    http://forums.codeguru.com/showthrea...-knowing-angle

    One of the things that you may have to modify is the"x" value might get too large so you can either use a DateTime variable or you may override the plot method to manually draw this on the chart.

    For an example of how to override the plot method you may see a reference under Tools -> Edit NinjaScript -> Indicators -> CustomPlotSample.

    http://msdn.microsoft.com/en-us/libr...code-snippet-2
    JCNinjaTrader Customer Service

    Comment


      #3
      Originally posted by funk101 View Post
      Looking for help in drawing a line at a 45 degree angle given just a starting point. eg: Low[x] then just calculate the 45 degree angle to, eg: CanvasRight for example. I realize this is probably "unsupported", any help from the C# programmers would be greatly appreciated.
      Angles are just a proxy for momentum. The concept of angles was useful when charts were printed on paper without ever changing the scales.

      With modern charting software that allows you to change (or autoscale) the x-axis and y-axis, the concept of an angle as a substitute for momentum is useless.

      You are coming 30 years late.

      Comment


        #4
        Ha, what a crazy response! How bold of you to assume my intentions.
        Best of luck trading, Harry.

        Comment


          #5
          Originally posted by funk101 View Post
          Ha, what a crazy response! How bold of you to assume my intentions.
          Best of luck trading, Harry.
          I have seen too many indicators based on angles, and none of them worked correctly. Scalability and angles do not go together. Also angles do not pass the consistency test (C-Test) as suggested by trader and mathematician William Eckhardt.

          Of course I do not know, what you are going to do with the angles.Maybe you just wanted to embellish your chart ?

          Angles are sort of a red flag which I cannot ignore. This explains my funnny response. Drawing lines from a starting point would usually require some normalization, that is dividing the vertical distance by the average true range or standard deviation of the bars shown on the chart.
          Last edited by Harry; 08-11-2013, 01:49 AM.

          Comment


            #6
            Yes my friend, a purely technical response would've been nice. However, if I need an *opinion* on some issue in the future I will be sure and seek you out.
            Cheers.

            Comment


              #7
              You need to replace "angle" with "rise over run", then define what is a unit of "rise" (for example a multiple of the average true range, a tick or a point) and what is the unit of "run" (1 bar or a time interval). Once the units for "rise" and "run" have been defined, you can introduce a concept of an artificial slope. An angle of 45 degrees would be represented by a number units of "rise" over an equal amount of units of "run".

              The concept of rise-over-run is explained here:

              http://stockcharts.com/school/doku.p...dicators:slope

              Again on scalable charts there are no real invariant angles.

              Comment


                #8
                Originally posted by funk101 View Post
                Yes my friend, a purely technical response would've been nice. However, if I need an *opinion* on some issue in the future I will be sure and seek you out.
                Cheers.
                If I may poke my nose in here. Actually Harry did give you a technical response. He just also added a humorous comment, with which it appears that you take umbrage. His response is pretty much driven by the same reasons that we gave in this thread. ref: http://www.ninjatrader.com/support/f...22460#poststop.

                The real point here is that angles really are meaningless on quantified scales, but at a time when charts were being drawn by hand on graph paper, they made a convenient shortcut to determining rise/run, and as charts were generally drawn to the same convenient scale, that made angles a viable quick visualization tool. On today's charts, that are often autoscaled by the computer, you no longer have fixed axes, so an angle drawn, while putatively remaining at the same visual slope, no longer represents that same rise/run ratio after the chart scale may have been changed by the software. Conversely, the same rise/run ratio may easily be shown at different visual angles as the chart axes change. The conclusion here then is that, on modern computerized charts, the visual angle is often not representative of the real world price/chart action, and may actually be misleading.

                Comment


                  #9
                  Well I'll leave you guys to it.
                  Thanks.
                  Peace.

                  Comment


                    #10
                    Originally posted by funk101 View Post
                    Well I'll leave you guys to it.
                    Thanks.
                    Peace.

                    This only chance of this working is on a logarithmic chart with margin type on price.

                    This would not work on a linear chart, as any adjustment of the scale by NT or you makes it no where near a 45 degree angle anymore.

                    Comment


                      #11
                      Originally posted by koganam View Post
                      If I
                      Originally posted by Harry View Post
                      Angles are just a proxy for momentum. The concept of angles was useful when charts were printed on paper without ever changing the scales.

                      With modern charting software that allows you to change (or autoscale) the x-axis and y-axis, the concept of an angle as a substitute for momentum is useless.
                      .
                      Originally posted by sledge View Post
                      This only chance of this working is on a logarithmic chart with margin type on price.

                      This would not work on a linear chart, as any adjustment of the scale by NT or you makes it no where near a 45 degree angle anymore.
                      So how does something like http://www.integrity-traders.com/ind..._category_id/9 work?

                      Comment


                        #12
                        Originally posted by MarsOptimus View Post
                        I dunno...no access..

                        Home
                        Please login first

                        User Name
                        Password
                        Remember me
                        Log in
                        Forgot your password?
                        Forgot your username?
                        Don't have an account?


                        edit:

                        Where are the indicators??


                        The indicators are in the Indicator Store (now including the free indicators) which is only accessable to registered users. You can register here or at the 'Login' tab at the top of the page.

                        Once registered and logged in, you will see the Indicators Store listed here under the Indicators menu or in the menu at the top of this page.

                        Comment


                          #13
                          Originally posted by MarsOptimus View Post
                          No access to that to which you point. If you want information about such, try sending a PM to eDanny.

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by Jschmelz, Today, 04:45 PM
                          1 response
                          7 views
                          0 likes
                          Last Post NinjaTrader_Marco  
                          Started by sisenberg, Today, 08:06 PM
                          1 response
                          7 views
                          0 likes
                          Last Post sisenberg  
                          Started by priceisking, Today, 07:44 PM
                          0 responses
                          5 views
                          0 likes
                          Last Post priceisking  
                          Started by saltminer, Today, 06:06 PM
                          0 responses
                          5 views
                          0 likes
                          Last Post saltminer  
                          Started by KennyK, Today, 05:25 PM
                          0 responses
                          7 views
                          0 likes
                          Last Post KennyK
                          by KennyK
                           
                          Working...
                          X