• 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

Get Object y-value

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

    Get Object y-value

    how do you get the y value or chart anchor position of a drawn object.

    ok I found it.

    PHP Code:
    ChartAnchor Properties



    <ChartAnchor>.BarsAgo
     
    An int representing the 
    "barsAgo" value that was passed to the DrawingTool method
     

    <ChartAnchor>.DisplayName
     
    A string representing name of the DrawingTool
    's chart anchor that is displaying on the UI
     

    <ChartAnchor>.DrawingTool
     
    The IDrawingTool object which created the DrawingTool'
    s chart anchor object
     

    <ChartAnchor>.DrawnOnBar
     
    An int representing the CurrentBar value that the DrawingTool
    's chart anchor was drawn
     

    <ChartAnchor>.IsNinjaScriptDrawn
     
    A bool indicating the object was drawn programmatically
     

    <ChartAnchor>.Price
     
    A double representing the price the  DrawingTool'
    s chart anchor was drawn
     

    <ChartAnchor>.SlotIndex
     
    A double representing the DrawingTool
    's chart anchor index value the anchor was drawn
     

    <ChartAnchor>.Time
     
    A DateTime representing the time value the DrawingTool'
    s chart anchor was drawn
     


    Examples
     
    Text myText
    ;
    protected 
    override void OnBarUpdate()
    {   
       if(
    CurrentBar == 50)
         
    myText Draw.Text(this"tag""test"0High[0]);     
       
       if(
    myText != null)
       {           
         Print(
    myText.Anchor.DrawnOnBar); // drawn on bar 50
       
    }
       

    Last edited by cutzpr; 09-19-2016, 11:21 AM.

Latest Posts

Collapse

Topics Statistics Last Post
Started by Papercut110, Today, 09:08 PM
0 responses
4 views
0 likes
Last Post Papercut110  
Started by iq200, 11-09-2019, 08:26 AM
5 responses
56 views
0 likes
Last Post koganam
by koganam
 
Started by johng964, Today, 02:57 PM
1 response
11 views
0 likes
Last Post NinjaTrader_RyanS  
Started by spamula, Today, 03:00 PM
2 responses
16 views
0 likes
Last Post spamula
by spamula
 
Started by MARTIN MARTIN, Today, 01:01 PM
0 responses
16 views
0 likes
Last Post MARTIN MARTIN  
Working...
X