• 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

On render and drawing rectagles based on price and time

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

    On render and drawing rectagles based on price and time

    Is there a way to draw a rectangle based on the price and time of the chart using onRender. I understand float and drawing on the screen, but not sure howto get that value from price and time.

    #2
    Hello ballboy11,

    You can find the conversion methods for X/Y values in the following two pages:

    https://ninjatrader.com/support/help...artcontrol.htm
    https://ninjatrader.com/support/help...chartscale.htm

    If you already have a price/time value and wanted to convert to X/Y you can use the following:

    For converting a time to an X value use ChartControl.GetXByTime()
    For converting a Price to Y value use ChartScale.GetYByValue()

    To collect prices/times you can use the GetValueAt() method to retrieve price/time data from the series:
    Code:
    Close.GetValueAt(i)
    Time.GetValueAt(i)
    https://ninjatrader.com/support/help...sub=getvalueat


    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by nytdfs, Today, 05:00 AM
    0 responses
    2 views
    0 likes
    Last Post nytdfs
    by nytdfs
     
    Started by PG7940, Today, 04:36 AM
    0 responses
    2 views
    0 likes
    Last Post PG7940
    by PG7940
     
    Started by elliot5, Today, 03:40 AM
    0 responses
    3 views
    0 likes
    Last Post elliot5
    by elliot5
     
    Started by itrader46, Today, 02:23 AM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_Marco  
    Started by jeronymite, Today, 01:57 AM
    0 responses
    6 views
    0 likes
    Last Post jeronymite  
    Working...
    X