Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Unmanaged Strategy access to ChartControl

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

    Unmanaged Strategy access to ChartControl

    Unmanaged Strategy again...

    I see that NinjaTrader.NinjaScript.Strategies.ChartControl is an object
    accessible to NinjaTrader.NinjaScript.Strategies.Strategy instance.

    Of course I can subclass MyChartControl : ChartControl and override
    functions.

    Also, I see there is an inherited Get/Set property ChartControl yielding an object
    of type ChartControl.

    So this ChartControl object has a huge number of properties, etc. but sticking
    to a basic one, MouseDown is MouseButtonEventHandler UIElement.MouseDown
    event, so my question is how I can capture this event; by using the += event
    registration approach; or, preferably, using an override of OnMouseDown ???

    temporarily puzzled.

    So I'm just scratching my head wondering how to activate/use my subclass
    MyChartControl in the event dispatching structure. How do I gain access,
    for example, to the override "void OnMouseDown(MouseButtonEventArgs e)"

    As a basic, I'd like to get X,Y coordinates where Y is PRICE on the chart
    where the Mouse is left-clicked, and other such things.

    Thanks for some help, please point me in the right direction.
    Always appreciated !



    #2
    Hello Hyper,

    Thanks for your post.

    Attached is an example indicator that can demonstrate. This can be implemented in a strategy in the same fashion.

    We look forward to assisting.
    Attached Files

    Comment


      #3
      Hyper and Jim, Thank You both very much, just what I needed. Ken

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      81 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      46 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      29 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      32 views
      0 likes
      Last Post TheRealMorford  
      Started by Mindset, 02-28-2026, 06:16 AM
      0 responses
      66 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X