Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Host Indicator or Strategy?

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

    Host Indicator or Strategy?

    Is it possible to access the "HOST" indicator or strategy for an Indicator?

    I would like to have my indicator to "ask" the host Indicator/Strategy for data. For example, I would like to be able to have an indicator ask a strategy that hosts it for the Profit in Ticks.

    I know I can expose these values through an interface, but it would be nice to have the hosted indicator simply access the host indicator/strategy and access the interface to get required data.

    #2
    Hi NJA_MC,

    This might be possible by setting a variable in the indicator to the instance of the strategy. Then you should be able to access the strategy's objects.

    The attached example should help.

    (The normal way is to push values from the strategy to the indicator)
    Attached Files
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_ChelseaB View Post
      Hi NJA_MC,

      This might be possible by setting a variable in the indicator to the instance of the strategy. Then you should be able to access the strategy's objects.

      The attached example should help.

      (The normal way is to push values from the strategy to the indicator)
      Thanks,

      I was heading that way, but this would required the strategy/indicator to set a property in the hosted indicator. Given the structure I have (dynamic indicators), the hosting strategy/indicator will not know if the indicator needs to be set. It would be better to be able to somehow track the host strategy via the hosted indicator. I am hoping there is some form or Parent variable set which I can trace back.

      Comment


        #4
        Hi NJA_MC,

        There isn't a documented way to find if the indicator was added to a chart by an indicator and to capture that strategy and I am not aware of any undocumented way to find this. The parent of the indicator is the indicator base when run from a strategy.

        Would you like to submit a feature request to create an object that contains the originating strategy object (when run from a strategy)?
        It is up to development to decide if and when a feature request will be implemented.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Hi Chelsea,

          I guess it couldn't hurt to put in a feature request. It is not likely to fix my current issue so I will need to figure out a semi-automated way to pass in the parent object to the child object in the mean time. Maybe others will find this concept useful in the future so we can collect feedback from others on interest.

          Comment


            #6
            Originally posted by NJA_MC View Post
            Is it possible to access the "HOST" indicator or strategy for an Indicator?

            I would like to have my indicator to "ask" the host Indicator/Strategy for data. For example, I would like to be able to have an indicator ask a strategy that hosts it for the Profit in Ticks.

            I know I can expose these values through an interface, but it would be nice to have the hosted indicator simply access the host indicator/strategy and access the interface to get required data.
            One roundabout way would be to have the indicator subscribe to account events, mark the strategy order events, and query the orders as they hit the account to determine if the strategy submitted them. Just an idea, albeit it sounds a bit cumbersome.

            Comment


              #7
              Hello NJA_MC,

              For future reference, your request to track strategy via hosted indicator is being tracked with ID# SFT-1561.

              Please let me know of any other requests or suggestions you have for the NinjaTrader platform.
              Chelsea B.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by GussJ, 03-04-2020, 03:11 PM
              11 responses
              3,229 views
              0 likes
              Last Post xiinteractive  
              Started by andrewtrades, Today, 04:57 PM
              1 response
              14 views
              0 likes
              Last Post NinjaTrader_Manfred  
              Started by chbruno, Today, 04:10 PM
              0 responses
              7 views
              0 likes
              Last Post chbruno
              by chbruno
               
              Started by josh18955, 03-25-2023, 11:16 AM
              6 responses
              441 views
              0 likes
              Last Post Delerium  
              Started by FAQtrader, Today, 03:35 PM
              0 responses
              12 views
              0 likes
              Last Post FAQtrader  
              Working...
              X