Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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
    BertrandNinjaTrader Customer Service

    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 pmachiraju, 11-01-2023, 04:46 AM
        8 responses
        148 views
        0 likes
        Last Post rehmans
        by rehmans
         
        Started by mattbsea, Today, 05:44 PM
        0 responses
        5 views
        0 likes
        Last Post mattbsea  
        Started by RideMe, 04-07-2024, 04:54 PM
        6 responses
        33 views
        0 likes
        Last Post RideMe
        by RideMe
         
        Started by tkaboris, Today, 05:13 PM
        0 responses
        5 views
        0 likes
        Last Post tkaboris  
        Started by GussJ, 03-04-2020, 03:11 PM
        16 responses
        3,282 views
        0 likes
        Last Post Leafcutter  
        Working...
        X