Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

CS 0115 on OnMouseDown()

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

    CS 0115 on OnMouseDown()

    Hi guys,

    I'm writing a context menu driven historical paper trader in NT8. (I've already gotten one working successfully in NT7).

    The OnMouseDownEvent() function seems to have been replaced by OnMouseDown(), which is fine by me since it looks like it might make my job easier.

    However, when I call the function in my indicator (which is working fine before I add this function), I get a CS0115 compilation error.

    I have a #using NinjaTrader.NinjaScript.DrawingTools statement.

    #2
    Hello trader_rick,

    Thanks for opening the thread.

    OnMouseDown() is only intended to be overridden when creating your own Drawing Tools. It would be expected to receive an error when trying to use it in an indicator. You will need to create an event handler to do this and assign it to ChartControl.MouseLeftButtonDown.

    Our colleague Chelsea has some scripts on the forums that should be a good start for creating a context menu or for registering mouse clicks from an indicator.

    Registering mouse clicks with ChartControl.MouseLeftButtonDown - http://ninjatrader.com/support/forum...5&d=1466021520

    Context Menus and Toolbars - http://ninjatrader.com/support/forum...327#post499327

    Please let me know if I may be of further help.
    Last edited by NinjaTrader_Jim; 05-05-2017, 10:11 AM.

    Comment


      #3
      OK thanks

      asdfasdfasdfasdfasdf

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      557 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      324 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      545 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      547 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X