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 sjsj2732, Yesterday, 04:31 AM
    0 responses
    31 views
    0 likes
    Last Post sjsj2732  
    Started by NullPointStrategies, 03-13-2026, 05:17 AM
    0 responses
    286 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    283 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    132 views
    1 like
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    91 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Working...
    X