Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Exposed variable from Strategy to Indicator

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

    Exposed variable from Strategy to Indicator

    Hello,

    I am trying to do that the same way I expose variables from indicators to strategies, but I see it is not working the same bidirectional way.

    Is there a reliable way to achieve that?

    Basically what I want is to plot a variable from the strategy, but I want it to plot it whenever I want by using an Input in the UI. The problem is if I do that within the strategy, if I don't want to plot my variable it still creates the lower panel... So I thought to expose it to an indicator just to work around this.

    I appreciate your suggestions.

    #2
    Hello roblogic,

    We actually have a sample which demonstrates what you are asking. If you want to plot either IsOverlay or in a separate panel you can do that with an indicator. The sample we have demonstrates gathering values from a strategy to plot from an indicator:



    In the sample, pay attention to how the indicator has a public Strategy property and how that is used to gather data. Also in the strategy how it passes its own instance to the indicator.

    I look forward to being of further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    81 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    42 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    64 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    68 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    55 views
    0 likes
    Last Post CarlTrading  
    Working...
    X