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 CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    34 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    130 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    184 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    94 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    138 views
    0 likes
    Last Post cmoran13  
    Working...
    X