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

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().

    This indicator provides a customizable text box which displays a position’s UnRealized PnL, Realized PnL of a selected account, and the overall cash value of the account.


    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 Waxavi, Today, 02:10 AM
    1 response
    17 views
    0 likes
    Last Post NinjaTrader_LuisH  
    Started by Kaledus, Today, 01:29 PM
    5 responses
    13 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by Waxavi, Today, 02:00 AM
    1 response
    12 views
    0 likes
    Last Post NinjaTrader_LuisH  
    Started by alifarahani, Today, 09:40 AM
    5 responses
    23 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by gentlebenthebear, Today, 01:30 AM
    3 responses
    17 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Working...
    X