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 CarlTrading, 03-31-2026, 09:41 PM
    1 response
    68 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    38 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    63 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    62 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    53 views
    0 likes
    Last Post CarlTrading  
    Working...
    X