• 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

Disable indicator selection by clicking on custom rendered objects.

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

  • fx.practic
    replied
    Many thanks, Kate
    It works perfect!

    Leave a comment:


  • NinjaTrader_Kate
    replied
    Hello fx.practic,

    Thank you for your post.

    If you would like to prevent plots from being selectable, you could force the indicator rendering to only happen without hit testing passes.

    Code:
    protected override void OnRender(ChartControl chartControl, ChartScale chartScale)
    {
        if(!IsInHitTest)                                                    // Use IsInHitTest to avoid rendering for hit test passes
            base.OnRender(chartControl, chartScale);                        // Call base OnRender() method to paint defined Plots.
    }
    Here are links to our help guide that go into more detail regarding OnRender() and IsInHitTest:

    OnRender() - https://ninjatrader.com/support/help...s/onrender.htm

    IsInHitTest - https://ninjatrader.com/support/help...sinhittest.htm

    Please let me know if I can be of further assistance.
    Last edited by NinjaTrader_Kate; 06-19-2019, 10:16 AM. Reason: code formatting

    Leave a comment:


  • Disable indicator selection by clicking on custom rendered objects.

    Hello.
    I am creating an indicator with the wide areas filled by colors (sessions) via method only.
    And I found that clicking on the filled area



    initiates indicator selection (and prevents scrolling, for example).
    While clicks inside non-filled area don't select indicator (please, see the video: ​​​​​​ ​https://www.screencast.com/t/1UD3sexJG)

    The question: How to disable indicator selection by clicking on custom rendered objects?
    Is there another way, then uncheck "Allow the selection of drag/drop of chart series
    "
    Last edited by NinjaTrader_Jim; 06-19-2019, 06:29 AM. Reason: Fix Screencast link

Latest Posts

Collapse

Topics Statistics Last Post
Started by frankduc, Today, 06:55 AM
0 responses
2 views
0 likes
Last Post frankduc  
Started by Jonathan.Lee, Yesterday, 10:39 PM
1 response
8 views
0 likes
Last Post NinjaTrader_PaulH  
Started by corman, Today, 06:04 AM
1 response
9 views
0 likes
Last Post NinjaTrader_Jim  
Started by brunoviveiros, Today, 06:00 AM
0 responses
4 views
0 likes
Last Post brunoviveiros  
Started by JAtrades, Today, 05:20 AM
4 responses
12 views
0 likes
Last Post JAtrades  
Working...
X