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 CaptainJack, 05-29-2026, 05:09 AM
    0 responses
    213 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 05-29-2026, 12:02 AM
    0 responses
    126 views
    0 likes
    Last Post CaptainJack  
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    145 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    229 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    190 views
    0 likes
    Last Post CarlTrading  
    Working...
    X