Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Trigger a indicator by clicking side button in my mouse, instead of middle boutton

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

    Trigger a indicator by clicking side button in my mouse, instead of middle boutton

    Hi team,

    I am trying to modify an indicator script of a risk ruler tool (https://ninjatraderecosystem.com/use...oad/riskruler/). Instead of clicking my mouse's middle button, I would like to trigger the risk ruler by clicking the side button of my mouse (attached below).

    From the old script, I think the trigger is the line "if (e.MiddleButton == MouseButtonState.Pressed)". How should I update it so that the indicator trigger could change to the side button? In other words, has Ninjatrader defined my side button so that I could replace the line above directly? Thanks.

    Click image for larger version

Name:	image.png
Views:	174
Size:	139.0 KB
ID:	1225128

    #2
    Hello morong0414,

    Thanks for your post.

    This is not a NinjaScript item so it would not be documented in the help guide. This is also not something that NinjaTrader manages, it is part of the WPF / C# framework.

    On the publicly available MSDN documentation linked here you could find information about the mouse button state enum: https://docs.microsoft.com/en-us/dot...tframework-4.8

    The items you see in that documentation should be able to be used with the WPF controls in NinjaTrader.

    Please let me know if I may be of additional assistance.​
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    110 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    59 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    37 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    41 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    78 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X