• 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

Editing Fib Retracement Properties

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

  • NinjaTrader_Jesse
    replied
    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());
    	}
          }
     }
    Please let me know if I may be of additional assistance.

    Leave a comment:


  • Tanguero
    replied
    Actually, the reverse: say if I draw a rectangle manually, what function will get back the startY and endY values so that these can be used for further calculations?

    Leave a comment:


  • NinjaTrader_Jesse
    replied
    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
    http://www.ninjatrader.com/support/h...ml?drawing.htm

    Please let me know if I may be of additional assistance.

    Leave a comment:


  • Tanguero
    replied
    Great. Could you suggest where to look up the functions for extracting values of IDrawObjects - can't find these anywhere on the help pages.

    Leave a comment:


  • NinjaTrader_CalH
    replied
    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.htm

    Leave a comment:


  • Tanguero
    replied
    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?

    Leave a comment:


  • NinjaTrader_CalH
    replied
    Hello Tanguero,

    Thank you for your post.

    You would not be able to access the values from the Fibonacci draw objects.

    You would need to create your draw object so you can grab those values and add the labels.

    Let me know if I can be of further assistance.

    Leave a comment:


  • Tanguero
    replied
    Ok I now see that Fibo properties cannot be edited - is it still possible to extract values of different retracements and add labels next to them?

    Leave a comment:


  • Tanguero
    started a topic Editing Fib Retracement Properties

    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?

Latest Posts

Collapse

Topics Statistics Last Post
Started by TazoTodua, Today, 12:29 PM
1 response
21 views
0 likes
Last Post bltdavid  
Started by sdauteuil, Today, 03:16 PM
0 responses
6 views
0 likes
Last Post sdauteuil  
Started by Zenersev, Today, 02:11 PM
0 responses
4 views
0 likes
Last Post Zenersev  
Started by TazoTodua, Today, 12:00 PM
0 responses
7 views
0 likes
Last Post TazoTodua  
Started by martyn73, Today, 08:56 AM
0 responses
10 views
0 likes
Last Post martyn73  
Working...
X