Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Passing values between indicators using intSeries

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

    Passing values between indicators using intSeries

    I am attempting to pass values from one indicator to another using intSeries. I followed the code in the BoolSeries example and managed to get the “called” indicator to store the needed int values in the intSeries structures. However, I’ve encountered a problem getting the “calling” indicator to compile correctly. The called indicator runs in the Input series panel and the other will run in any other panel.

    I generated a shell indicator using the Wizard, did not specify any input parameters and only 1 plot series, all of which compiled clean. However when I attempted to include the calling indicator following the example in the BoolSeriesSample (which is a strategy) I encountered 2 compile errors. The format of the Add as per the sample is:

    Add(myIndicator());

    The error messages I received are:

    1. Indicator\MyCustomIndicator.cs The best overloaded method match for 'NinjaTrader.Indicator.IndicatorBase.Add(NinjaTrad er.Gui.Chart.Line)' has some invalid arguments CS1502

    2. Indicator\MyCustomIndicator.cs Argument '1': cannot convert from 'NinjaTrader.Indicator.myIndicator' to 'NinjaTrader.Gui.Chart.Line' CS1503

    As best as I can determine a parameter needs to be included in the Add (I tried “void” with no success). Mousing over the indicator name displays a tip box which indicates there is +1 overload available. Unlike others that I’ve seen that allow one to scroll though the various overloads available this tip box disappears as soon as the mouse is moved.

    I gather that the overload is generate when the called indicator is compiled and the necessary arguments are somehow determined.

    So, all that said:

    • how do I determine what needs to be included in the Add method, and
    • if parameters are passed to the called indicator will they override it’s current settings (which I do not want)?


    I am neither a NinjaScript or C# programmer so I appreciate any given help.

    Thank you

    #2
    Cheech, thanks for the post - only strategies could add indicators in for display. This would not be possible in an indicator script. And to access exposed values, this would also not be needed - you can directly call the exposed / variable / series or plot in your script to access.

    i.e. MyIndicator().MyCustomSeriesExposed[0]

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    566 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    330 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    547 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    548 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X