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 NullPointStrategies, Today, 05:17 AM
      0 responses
      50 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      126 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      69 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      42 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      46 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X