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

Get values from drawing object

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

    Get values from drawing object

    Hi,
    Is it possible to get return values from a drawing object in a strategy script?
    For example:
    1. My strategy draws a Fibonacci Retracement on my chart
    2. Can I read / get the values of the fib levels from this object?

    Alternatively is it possible to get the code that draws the Fib and integrate it into my script?

    thank you
    Ivan

    #2
    Hello Ivan,

    Thank you for your inquiry and welcome to the NinjaTrader Support Forum!

    It is possible to loop through the DrawObjects (http://ninjatrader.com/support/helpG...rawobjects.htm) collection and obtain the StartY and EndY values of an IFibonacciRetracements (http://ninjatrader.com/support/helpG...tracements.htm) object, but, unfortunately, it is not possible to directly obtain the price level values. You would have to manually calculate the price levels based on the StartY and EndY values.

    The DrawObjects page in the NinjaTrader help guide (linked above) provides an example of how to loop through the DrawObjects collection.

    If you would like to programmatically draw a Fibonacci retracement in code, here is a link for more information about the DrawFibonacciRetracements() method call: http://ninjatrader.com/support/helpG...tracements.htm

    Please, let us know if we may be of further assistance.
    Zachary G.NinjaTrader Customer Service

    Comment


      #3
      Thank you. I will review the links and see if they help.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by helpwanted, Today, 03:06 AM
      0 responses
      3 views
      0 likes
      Last Post helpwanted  
      Started by Brevo, Today, 01:45 AM
      0 responses
      7 views
      0 likes
      Last Post Brevo
      by Brevo
       
      Started by aussugardefender, Today, 01:07 AM
      0 responses
      5 views
      0 likes
      Last Post aussugardefender  
      Started by pvincent, 06-23-2022, 12:53 PM
      14 responses
      242 views
      0 likes
      Last Post Nyman
      by Nyman
       
      Started by TraderG23, 12-08-2023, 07:56 AM
      9 responses
      384 views
      1 like
      Last Post Gavini
      by Gavini
       
      Working...
      X