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!
See more
See less

Partner 728x90

Collapse

Extract value (price) horizontal line.

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

    Extract value (price) horizontal line.

    Hi good day. I would like to ask for something
    Could someone give me an NT8 code that extracts the value of a horizontal line CREATED in the graph (not created by strategy) ?
    Muchas gracias. Saludos.

    #2
    Hello samir,

    Thanks for writing in.

    For reference, please see the help guide here: https://ninjatrader.com/support/help...rawobjects.htm

    Here is a specific example:

    protected override void OnBarUpdate()
    {
    foreach (DrawingTool draw in DrawObjects.ToList())
    {
    if (draw is DrawingTools.HorizontalLine)
    {
    DrawingTools.HorizontalLine temp = draw as DrawingTools.HorizontalLine;

    Print(Time[0]+" Name: "+draw.Tag+" Horizontal line price " + temp.StartAnchor.Price);

    }
    }
    }
    Paul H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Max238, Today, 01:28 AM
    4 responses
    33 views
    0 likes
    Last Post Max238
    by Max238
     
    Started by r68cervera, Today, 05:29 AM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by geddyisodin, Today, 05:20 AM
    1 response
    11 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by timko, Today, 06:45 AM
    2 responses
    13 views
    0 likes
    Last Post NinjaTrader_ChristopherJ  
    Started by habeebft, Today, 07:27 AM
    0 responses
    6 views
    0 likes
    Last Post habeebft  
    Working...
    X