Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
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.JesseNinjaTrader Customer Service
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.
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()); } } }
JesseNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by arvidvanstaey, Today, 02:19 PM
|
3 responses
9 views
0 likes
|
Last Post Today, 03:23 PM | ||
Started by jordanq2, Today, 03:10 PM
|
2 responses
8 views
0 likes
|
Last Post
by jordanq2
Today, 03:23 PM
|
||
Started by traderqz, Today, 12:06 AM
|
10 responses
18 views
0 likes
|
Last Post
by traderqz
Today, 02:49 PM
|
||
Started by algospoke, 04-17-2024, 06:40 PM
|
5 responses
47 views
0 likes
|
Last Post Today, 02:36 PM | ||
Started by mmckinnm, Today, 01:34 PM
|
3 responses
7 views
0 likes
|
Last Post Today, 02:12 PM |
Comment