Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Draw listener

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

    Draw listener

    Hello

    I need to ask you... is there any listener interface or any method/function in NinjaTrader which is invoke/called everytime when user draw new object into chart?

    I am programming simple indicator, but I need that indicator will re-calculate everytime, when user draw something into chart.

    Imagine this:
    User choose any candle and click F7 (draw blue line on the selected candle) and right after the indicator should do some calculations - so the indicator needs to know when user draw the blue line (F7 button)

    Do you understand what I mean?

    Thank you

    #2
    zooinek, there's unfortunately no event on drawing object changes, you would need to loop through the collection of objects on each tick to be close to the point where the user finished adjusting it - http://www.ninjatrader.com/support/h...drawobject.htm

    Comment


      #3
      Hi

      How do I determine if a draw object is finished being adjusted?

      I'm writing a strategy to snap a manually drawn rectangle to the candles enclosed within it. It runs every tick as explained in the post below. However, if a tick arrives before I've drawn or adjusted the rectangle, it snaps while I'm dragging it. I would like to skip processing it until the adjusting is complete.

      If I could detect whether or not the rectangle is selected, then I could skip processing it until it is no longer selected. Is that possible?

      Cheers
      Tony

      Comment


        #4
        Hello Tony,

        This is not a supported way to detect the selected state of a drawing object.

        I am also not aware of any unsupported way to achieve this as well.

        However, for NinjaTrader 8, when looping through the DrawObjects, there is an IDrawingTool.IsSelected state that can be checked.
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        82 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        43 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        64 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        68 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        56 views
        0 likes
        Last Post CarlTrading  
        Working...
        X