Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Using Output of Indicator A as input to Indicator B

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

    Using Output of Indicator A as input to Indicator B

    Using Output of Indicator A as input to Indicator B

    I am unable to figure out what I have done incorrectly with Indicator A.
    I get the error CS0117 "Resource does not contain a definition for NinjaScriptIndicatorNameMidPoint15".
    I thought my two AddPlot instructions would define MidPoint15, but I am obviously incorrect.
    I used the MACD indicator as a template to define my output of Indicator A.
    I have attached a text file showing my code.
    If you can point me into the right direction it would be greatly appreciated.

    MidPoint15.txt





    #2
    Hello goodknight777,

    Thank you for your post.

    The syntax for AddPlot is below:

    AddPlot(Brush brush, string name)



    You are trying to use Custom.Resource.NinjaScriptIndicatorNameMidPoint15 and Custom.Resource.NinjaScriptIndicatorMidPoint15Shar ed for the names as if these are system NinjaTrader indicators, however since they are not you can't call them this way.

    Instead, you could do something like,

    Code:
    AddPlot(Brushes.DarkCyan,"MidPoint15" );
    AddPlot(Brushes.Crimson, "MidPoint15Shared");
    Please let us know if you have any further questions. ​

    Comment


      #3
      Thank you that was exactly what I needed.
      Can you tell me if Indicator A and indicator B can be on separate charts or is required that they both reside on the same chart?

      Comment


        #4
        Hello,

        In what sense? If you are accessing Indicator A from Indicator B, Indicator A's values are being accessed directly from the script.

        When using AddPlot(), the indicator will either plot on the price panel of the chart or in it's own separate panel.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        43 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        25 views
        0 likes
        Last Post PaulMohn  
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        162 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        98 views
        1 like
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        158 views
        2 likes
        Last Post CaptainJack  
        Working...
        X