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 geddyisodin, 04-25-2024, 05:20 AM
      8 responses
      60 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by jxs_xrj, 01-12-2020, 09:49 AM
      4 responses
      3,285 views
      1 like
      Last Post jgualdronc  
      Started by Option Whisperer, Today, 09:55 AM
      0 responses
      5 views
      0 likes
      Last Post Option Whisperer  
      Started by halgo_boulder, 04-20-2024, 08:44 AM
      2 responses
      22 views
      0 likes
      Last Post halgo_boulder  
      Started by mishhh, 05-25-2010, 08:54 AM
      19 responses
      6,189 views
      0 likes
      Last Post rene69851  
      Working...
      X