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:	177
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 CarlTrading, 03-31-2026, 09:41 PM
    1 response
    39 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    19 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    26 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    42 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    35 views
    0 likes
    Last Post CarlTrading  
    Working...
    X