Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

access Strategy object from indicator

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

    access Strategy object from indicator

    Hi,

    I'd like to be able to trigger various trade activities from within an Indicator such as manage the SL price from a new kind of indicator. Is it possible to get access to the instance of the strategy that an indicator is created in?

    Regards,

    Paul

    #2
    Hi Paul, unfortunately accessing the strategy object is not supported, as they would not offer cross communication.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Bertrand View Post
      Hi Paul, unfortunately accessing the strategy object is not supported, as they would not offer cross communication.
      Is there any way to reference the parent container that holds the indicator?

      Comment


        #4
        Paul, you can pass data from the parent strategy to the indicator invoked by the strategy. Here is a little example, not exactely what you are asking for, but somehow not far away:



        Regards
        Ralph

        Comment


          #5
          Originally posted by Ralph View Post
          Paul, you can pass data from the parent strategy to the indicator invoked by the strategy. Here is a little example, not exactely what you are asking for, but somehow not far away:

          http://www.ninjatrader.com/support/f...54&postcount=5
          Hi Ralph,
          I appreciate your feedback. Yes I'm aware of how to pass arguments to an Indicator. I want to manage the strategy from an indicator so if I can access the strategy object from the indicator it would make this possible.

          I'm already doing this from a couple of my Indicators by introducing an Abstract derived class from Strategy then extending public methods. I'd like to be able to control other people's strategies (such as the ChartTrader) from an indicator.

          Anyhow, many thanks.

          Paul

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by rajendrasubedi2023, Today, 09:50 AM
          2 responses
          12 views
          0 likes
          Last Post rajendrasubedi2023  
          Started by geddyisodin, Today, 05:20 AM
          4 responses
          28 views
          0 likes
          Last Post geddyisodin  
          Started by geotrades1, Today, 10:02 AM
          2 responses
          7 views
          0 likes
          Last Post geotrades1  
          Started by ender_wiggum, Today, 09:50 AM
          1 response
          5 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by bmartz, Today, 09:30 AM
          1 response
          10 views
          0 likes
          Last Post NinjaTrader_Erick  
          Working...
          X