Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Beginner Indicator Problem

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

    Beginner Indicator Problem

    I cannot find the problem with this indicator - I was literally following someone doing a webinar and for the life cannot see what is wrong.

    error - "Cannot implicitly convert type 'double' to 'NinjaTrader.Data.DataSeries' Line 95

    Can someone please help me out. Now when I create another separate Indicator - and try to compile - it gives me the same error and references the above indicator.

    Any help would be appreciated I have attached the indicator.

    Thanks,
    Attached Files

    #2
    Hi scott,

    The compile error is caused by this section:
    Code:
    [Browsable(false)]	// this line prevents the data series from being displayed in the indicator properties dialog, do not remove
    [XmlIgnore()]		// this line ensures that the indicator can be saved/recovered as part of a chart template, do not remove
    public DataSeries Signal
    {
    get { return _signal[0]; }
    }
    I don't see anywhere in your code you use this DataSeries Signal, so you can delete all of the above section and it will likely compile and work.

    The structure for that section of code would be needed if you wanted to expose the value of _signal from another indicator, using the public Signal that's linked to it. If you want to maintain this functionality, try with this change:

    Code:
    [Browsable(false)]	// this line prevents the data series from being displayed in the indicator properties dialog, do not remove
    [XmlIgnore()]		// this line ensures that the indicator can be saved/recovered as part of a chart template, do not remove
    public DataSeries Signal
    {
    get { return _signal; }
    }
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Ryan - figured it out - thank you that was it.
      Last edited by scott__; 02-24-2012, 02:47 PM.

      Comment


        #4
        What should I be looking for? For help resolving your compile errors, please see my last reply for two different approaches.
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          sorry - my lack of understanding at this point lead to the response. I made the change you recommended and all is good

          Thanks again

          Comment


            #6
            Great that took care of it. Thanks for updating us!
            Ryan M.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Lumbeezl, 01-11-2022, 06:50 PM
            31 responses
            817 views
            1 like
            Last Post NinjaTrader_Adrian  
            Started by xiinteractive, 04-09-2024, 08:08 AM
            5 responses
            14 views
            0 likes
            Last Post NinjaTrader_Erick  
            Started by swestendorf, Today, 11:14 AM
            2 responses
            6 views
            0 likes
            Last Post NinjaTrader_Kimberly  
            Started by Mupulen, Today, 11:26 AM
            0 responses
            6 views
            0 likes
            Last Post Mupulen
            by Mupulen
             
            Started by Sparkyboy, Today, 10:57 AM
            1 response
            6 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Working...
            X