Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Chart Draw object algorithm

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

    Chart Draw object algorithm

    Hi Guys,

    I'm marking my chart with various objects, including DrawDiamond. Using nasty hard-coded offsets from bar high or low is very clumsy insofar as sometimes I'm overwriting the end of the bar and sometimes it's about half the chart away and I realise 10 minutes later that there is an object drawn on the chart !

    What I need to be able to do is to place an object with a bit of space between the high (or low) of the bar and the object.

    To do this, I need to know how many bars there are on my chart, and the lowest low and highest high displayed in order to be able to attempt to create an algorithm to place the object.

    I did a search but could not find anthing. Please help !!!

    Thanks,
    Eric

    #2
    Hi Eric,

    Unfortunately this is not supported. You cannot determine what is the lowest low and highest high currently being displayed. Draw objects require a specific y-value so it knows where to plot. I suggest you use something like PlaySound() along with the draw object. That way you will know an object was drawn even if you don't see it right away.
    Josh P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    108 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    55 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    37 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    38 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    75 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X