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 cre8able, Yesterday, 01:16 PM
        3 responses
        11 views
        0 likes
        Last Post cre8able  
        Started by ChartTourist, Today, 08:22 AM
        0 responses
        5 views
        0 likes
        Last Post ChartTourist  
        Started by LiamTwine, Today, 08:10 AM
        0 responses
        2 views
        0 likes
        Last Post LiamTwine  
        Started by Balage0922, Today, 07:38 AM
        0 responses
        5 views
        0 likes
        Last Post Balage0922  
        Started by JoMoon2024, Today, 06:56 AM
        0 responses
        6 views
        0 likes
        Last Post JoMoon2024  
        Working...
        X