Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Calling a custom indicator from multiple indicators

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

    Calling a custom indicator from multiple indicators

    Hi,
    I have a custom indicator (indicator A) which calculates a number of parameters and exposes them to other indicators for use.
    Every time indicator A is accessed by another indicator a new instance of indicator A is created.
    is there a way to only create 1 instance of indicator A no matter how many indicators accessing it?​

    #2
    Hello Kevint40,

    Thank you for your post.

    Unfortunately there is no supported concept to do this in NinjaScript. Each time you call the indicator from another indicator, it will be accessing it's own instance of the indicator.

    If you wanted to share information across several indicators you could create a static class, although this is more a C# concept than it is related to NinjaScript so we don't have much documentation for this.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    80 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