Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Editing Fib Retracement Properties
Collapse
X
-
Editing Fib Retracement Properties
Can anyone suggest the closest indicator template (I could not find anything similar in the indicators library) to adapt for automatically changing the properties of Fib retracements and adding labels and adding calculations next to the lines - I was hoping to use my limited programming skills to do the rest?Tags: None
-
Thanks - is it possible to retrieve values of any other objects, be it a line, a square or anything else - my goal is to manually draw such object first to show the indicator which two bars I am interested in, then the indicator would automatically calculate the stop loss and take profit value based on the price difference between the bars and print these numbers?
Comment
-
Tanguero,
Thank you for the information.
In this case, you can look into the IDrawObjects, also along with IRectangle, ILine and so forth.
This will get the exposed values that you want.
http://www.ninjatrader.com/support/helpGuides/nt7/index.html?idrawobject.htmCal H.NinjaTrader Customer Service
Comment
-
Hello Tanguero,
Are you looking for a listing of the available methods that you can access for each type of draw object?
These are all available if you expand the "Drawing" section that is located in the help guide under:
NinjaScript -> Language Reference -> Drawing
Here is a link to that section
Please let me know if I may be of additional assistance.
Comment
-
Hello Tanguero,
Thanks for clarifying that for me.
I would recommend taking a look at the following link. It is for an indicator called Alert for manually drawn lines. This has essentially what you are asking for in its code.
One note, manually drawn lines can be accessed from NinjaScript but not edited.
Heres the link: http://www.ninjatrader.com/support/f...d=4&linkid=472
Here is an example of getting the Y value from a Line that was manually drawn.
Please let me know if I may be of additional assistance.Code:protected override void OnBarUpdate() { foreach (IDrawObject draw in DrawObjects) { //Print(draw.DrawType.ToString()); //prints out all the drawn objects on the chart if(draw.DrawType.ToString() == "Line") { ILine l = (ILine)draw as ILine; Print(l.EndY.ToString()); } } }
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
576 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
334 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