Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Can value(price on the price panel) be derived from the system for a Drawn object?

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

    Can value(price on the price panel) be derived from the system for a Drawn object?

    Something like AddPlot (but not)

    Is it possible to find the bar price for a particular drawn object? I am thinking of a Ray, Line, Arc but more complex multi-part objects could be map to the parts, bar, value(price on pricepanel).

    If they return a value, might the returned value be used to derive the price for a given bar(slot or bar-time) that object is drawn on? Or perhaps use the every present drawn object Tag could be use instead?

    example:

    RayRtnVal = Draw.Ray(NinjaScriptBase owner, string tag, int startBarsAgo, double startY, int endBarsAgo, double endY, Brush brush)

    RayRtnVal = Draw.Ray(this, "RayTag76" , 61, 3291, 0, 3208, Brushes.Green)
    This Ray is clearly at a sloping angle. Yes I understand knowing the slope we can calculate the value of interest. Isn't this information sort of known in that the object was drawn into the environment? Also I understand the "Ray" Object defined in the docs does not contain the information.

    Price = DerivePriceFromOject(Bar, RayRtnVal);

    Or perhaps use the Tag instead of Return Value

    Price = DerivePriceFromOject(Bar, "RayTag76");

    Am I asking too much or does this already exist?

    thank you for your assisance

    #2
    Hello MartinT,

    Draw objects have anchors. The anchors have a .Price property.

    Below is a link to the help guide on a Ray object.


    And a link to the help guide on anchors.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hi ChelseaB,

      Thank you for your swift reply. I do understand the concept of an Anchor for various drawn objects. They are end points or object reference like in the case of a Ray etc... I am interested in the price along the entire length of the drawn object for any given chart-slot. Lets say all drawn objects had some sort of "PriceLevel" object associated with them. That is the type of data I am interested in. I understand PriceLevel is limited to specific Drawn Objects today. So for a Ray or and Arc or whatever, the price could be resolved from the drawn objects properties like Pricelevel. Is something available today for simple drawn objects like lines, rays or Arcs? Or is this something that could be added as an additional feature?

      Comment


        #4
        Hello MartinT,

        Try drawing a ray manually on a chart.

        Pay close attention to where you click on the chart as you draw it.

        Then open the Draw Objects window and select that drawing object. Then look at the anchors and compare those anchors to where you clicked on the chart when drawing the object.


        Ray's have anchors but do not have price levels. The Fibonacci Retracements drawing object has price levels.

        Yes, you can get the price of the anchors of drawn objects such as a ray, line or arc.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          ChelseaB,
          Thank you. Yes, the anchors can provide a price but only at anchor points. In the case of an Arc I trying to find a means of acquiring the price along the length of the Arc. Lines and Rays are solvable knowing the slope and anchors. The Arc is more complicated. Is there is a formula for deriving price along length an Arc knowing the parameters of the Arc with in NinjaTrader 8? Sure looking at it on the chart can tell me the price along the Arc. I would like to use the price along the Arc (Arc Price) programatically.

          Comment


            #6
            Hello MartinT,

            You would need custom math to custom calculate a price along a path.

            Below is a link to forum post that shows how to project the y value along a line using algebra, which should give you an idea.
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Hello Chelsea B.,

              Thank you. I will persue your recommendation.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by algospoke, Yesterday, 06:40 PM
              2 responses
              21 views
              0 likes
              Last Post algospoke  
              Started by ghoul, Today, 06:02 PM
              3 responses
              14 views
              0 likes
              Last Post NinjaTrader_Manfred  
              Started by jeronymite, 04-12-2024, 04:26 PM
              3 responses
              45 views
              0 likes
              Last Post jeronymite  
              Started by Barry Milan, Yesterday, 10:35 PM
              7 responses
              21 views
              0 likes
              Last Post NinjaTrader_Manfred  
              Started by AttiM, 02-14-2024, 05:20 PM
              10 responses
              181 views
              0 likes
              Last Post jeronymite  
              Working...
              X