Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Guys need some help-Trend Line in strategy
Collapse
X
-
Guys need some help-Trend Line in strategy
I am trying to figure out how I could build a trend line into my rule where if its broken my position will enter or exit depending on current position. Does someone have a way that they build automatic trend lines where its touching just the lowest low and the highest low and vice versa, and ignore the data in between. Drawing it by hand is easy on a chart, but I'm trying to figure out how I could actually have this coded for either a fixed number of bars, where it re checks the slope, or an adaptive level of number of bars based on it extending itself. Any input is greatly appreciated about how I could do this.Tags: None
-
JSeymour,
You would need to determine what kind of logic you want to use to draw it. Then you can use DrawLine() to programmatically draw it, but this is not programmatically accessible. You will have to do math yourself to determine slope and things like that in your code.Josh P.NinjaTrader Customer Service
-
What I mean by it is that you can for sure draw the line at whatever points you want, but after you draw the line you can't, for instance, access the value of the line at any particular point on the line.
The only values at your disposal would be the beginning and ending points of the line.Josh P.NinjaTrader Customer Service
Comment
-
"Draw Objects Enhancements
Draw objects are now associated to an indicator which means that if a user removes a draw object from the chart, it will also remove the indicator. In addition, all draw objects spawned from an indicator share the indicator's z-order.
IDrawObject - IDrawObjects are now returned to the caller on all Draw() methods. IDrawObjects expose draw objects properties.
Work in progress - We will implement programmatic access to draw objects added to a chart manually. For example, you can have a user draw a line on a chart and add a "tag" to this object and you can retrieve this object, read it's value and do something with it."
http://www.ninjatrader.com/webnew/NT7/NinjaTrader7.html Hope that helps.Josh P.NinjaTrader Customer Service
Comment
-
getting properties of objects manually drawn on a chart?
Could you please give an example of how to programatically access the properties of a user drawn object that was added to the chart manually, as mentioned by Josh in Post #6 of this thread?
Thank you.Last edited by Ricam; 03-08-2010, 05:08 PM.
Comment
-
Properties of a manually drawn object
In the previous example, the line seems to have been drawn programatically, not manually.
Is there a way to programatically iterate through the manually drawn objects that actually exist on a chart, to obtain their properties?
Thanks.Last edited by ZTR; 03-08-2010, 05:37 PM.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
633 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
364 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
105 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
567 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
568 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment