Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy to access indicator

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

    Strategy to access indicator

    Hi,

    I'm sure there is a post on this but I can't seem to find one that covers my question... or in the help guides.


    I created an indicator with 8 customized buttons added to the Chart Trader and all that is working fine...I referenced the information from the ChartTraderCustomButtonsExample which downloaded from another forum post.
    I just modified to suit my requirements...

    If I have a strategy that will check if one of the buttons is clicked...before it places stop limit order

    How can I have the strategy know that a button was clicked from the indicator?
    So how can I access the indicator button event from the strategy?

    If you can send me a link to another post or where it might be in the help guide that would be great...

    Or should I just do this as a strategy? I mean have the strategy add the buttons on the chart trader..but only problem with this is when I disable the strategy
    it removes the buttons which I tried...


    Regards
    Traderhawk

    #2
    Hello Traderhawk,

    This example has now become an official reference sample in the help guide.


    Accessing the event itself from the indicator would require very advanced custom c# code.
    There can be limitations using advanced C# concepts in NinjaScript, so your mileage may vary. As of now, we do not have any examples that can be used to navigate that path.

    One route I might suggest would be to use INotifyChange with a property change event, and then set the property from the button click event handler. The property change could then propagate to the strategy.



    The easist solution would be to just have the strategies add the button and have the button event handler.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Ok Thanks... I'll look into it...

      At this stage I'll keep using the strategy to add the buttons...

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      88 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      134 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      68 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      119 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      67 views
      0 likes
      Last Post PaulMohn  
      Working...
      X