Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Draw a line at a 45 degree angle...
Collapse
X
-
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.Tags: None
-
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.
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.
JCNinjaTrader Customer Service
-
Angles are just a proxy for momentum. The concept of angles was useful when charts were printed on paper without ever changing the scales.Originally posted by funk101 View PostLooking 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.
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
-
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.Originally posted by funk101 View PostHa, what a crazy response! How bold of you to assume my intentions.
Best of luck trading, Harry.
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
-
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:
Again on scalable charts there are no real invariant angles.
Comment
-
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.Originally posted by funk101 View PostYes 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.
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
-
Originally posted by funk101 View PostWell 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
-
Originally posted by koganam View PostIf IOriginally posted by Harry View PostAngles 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.
.So how does something like http://www.integrity-traders.com/ind..._category_id/9 work?Originally posted by sledge View PostThis 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
-
I dunno...no access..Originally posted by MarsOptimus View PostSo how does something like http://www.integrity-traders.com/ind..._category_id/9 work?
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
-
No access to that to which you point. If you want information about such, try sending a PM to eDanny.Originally posted by MarsOptimus View PostSo how does something like http://www.integrity-traders.com/ind..._category_id/9 work?
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
574 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
333 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
553 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
551 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment