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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      78 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      40 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      63 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      63 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      54 views
      0 likes
      Last Post CarlTrading  
      Working...
      X