• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Check if DrawArrow is selected

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

    Check if DrawArrow is selected

    Hi all,

    I am creating an indicator that places arrows above certain bars on the daily chart.

    I want to display some information in the DataBox window - when an arrow is selected on the chart.

    So the questions are :-

    1) How to I check to see if the arrow I have drawn on the chart is clicked?
    2) How do I display info in the DataBox ?

    Thanks



    #2
    Hello foxy_rav,

    Thanks for your message.

    The DataBox will show Plot values associated with the bar slot that the the mouse is over. There is not another supported way to write to this window. I may suggest using DrawTextFixed or custom rendering to display this info on the chart once the drawing object is found.

    DrawingObjects in NinjaTrader 7 do not have a supported property to check if the object is selected. I did a quick check of the forums to see if other community members have found unsupported approaches, but have not found anything for this specific purpose. I'll leave the thread open for anyone that has insight here.

    DrawingObjects do have an IsSelected property in NinjaTrader 8, however.

    In NinjaTrader 8, you can loop through the DrawObjects collection when the mouse is clicked to find a selected Drawing Object. I've attached an example.

    For drawing on the chart, you could use SharpDX rendering similar to what is done in the script below or use Draw.TextFixed().

    https://ninjatraderecosystem.com/use...lay-indicator/

    The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The add-ons listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.

    DrawTextFixed (NinjaTrader 7) - https://ninjatrader.com/support/help...wtextfixed.htm

    Draw.TextFixed (NinjaTrader 8) - https://ninjatrader.com/support/help..._textfixed.htm

    While the information above gives direction for NinjaTrader 8, we can hope it will move you forward should you get some insight for identifying a selected drawing object.

    We look forward to assisting.
    Attached Files
    JimNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by olivares_alfre, Yesterday, 02:19 PM
    2 responses
    13 views
    0 likes
    Last Post NinjaTrader_Marco  
    Started by hiikila, Today, 02:40 AM
    0 responses
    2 views
    0 likes
    Last Post hiikila
    by hiikila
     
    Started by Beauregard, Yesterday, 11:50 PM
    0 responses
    15 views
    0 likes
    Last Post Beauregard  
    Started by renkodan, Yesterday, 11:56 AM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by J_o_s, 04-04-2020, 11:17 PM
    1 response
    8 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Working...
    X