• 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

    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?

    #2
    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?

    Comment


      #3
      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.
      Cal H.NinjaTrader Customer Service

      Comment


        #4
        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


          #5
          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
          Cal H.NinjaTrader Customer Service

          Comment


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

            Comment


              #7
              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.
              JesseNinjaTrader Customer Service

              Comment


                #8
                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?

                Comment


                  #9
                  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.
                  JesseNinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by xinepev, Today, 12:33 AM
                  0 responses
                  3 views
                  0 likes
                  Last Post xinepev
                  by xinepev
                   
                  Started by sun0781, Yesterday, 05:02 PM
                  0 responses
                  7 views
                  0 likes
                  Last Post sun0781
                  by sun0781
                   
                  Started by ronhb107, 09-12-2019, 10:09 AM
                  4 responses
                  43 views
                  0 likes
                  Last Post Mr.Trader  
                  Started by rwilliam, Yesterday, 03:55 PM
                  0 responses
                  4 views
                  0 likes
                  Last Post rwilliam  
                  Started by asmmbillah, Yesterday, 03:42 PM
                  2 responses
                  9 views
                  0 likes
                  Last Post asmmbillah  
                  Working...
                  X