Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

draw commands mix both time and bar

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

    draw commands mix both time and bar

    If I draw a text or draw object at a specific time what is the best way to draw a second object so it will be in the next bar of the chart after the first object I just drew?

    I want the indicator to be independent of the chart time frame so the objects are drawn correct. I was using the bar number and that made it easy but now I am using time so I don't have a constant anymore.

    Do I need to determine the chart time frame and compute the object's destination time?
    Last edited by ct; 08-19-2012, 01:42 AM.

    #2
    ct,

    If you are using datetime here you would need to compute the correct times yourself unfortunately.

    This has some useful methods for adding / subtracting time from some time frame : http://msdn.microsoft.com/en-us/libr....datetime.aspx

    Otherwise, you could use the drawing object override that uses the "BarsAgo" property instead.
    Adam P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    648 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    369 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    108 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    572 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    573 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X