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
    JimNinjaTrader Customer Service

    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 junkone, Today, 11:37 AM
      2 responses
      15 views
      0 likes
      Last Post junkone
      by junkone
       
      Started by frankthearm, Yesterday, 09:08 AM
      12 responses
      44 views
      0 likes
      Last Post NinjaTrader_Clayton  
      Started by quantismo, 04-17-2024, 05:13 PM
      5 responses
      35 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by proptrade13, Today, 11:06 AM
      1 response
      7 views
      0 likes
      Last Post NinjaTrader_Clayton  
      Started by love2code2trade, 04-17-2024, 01:45 PM
      4 responses
      36 views
      0 likes
      Last Post love2code2trade  
      Working...
      X