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 carnitron, Today, 08:42 PM
        0 responses
        5 views
        0 likes
        Last Post carnitron  
        Started by strategist007, Today, 07:51 PM
        0 responses
        7 views
        0 likes
        Last Post strategist007  
        Started by StockTrader88, 03-06-2021, 08:58 AM
        44 responses
        3,974 views
        3 likes
        Last Post jhudas88  
        Started by rbeckmann05, Today, 06:48 PM
        0 responses
        8 views
        0 likes
        Last Post rbeckmann05  
        Started by rhyminkevin, Today, 04:58 PM
        4 responses
        58 views
        0 likes
        Last Post dp8282
        by dp8282
         
        Working...
        X