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 Christopher_R, Today, 12:29 AM
            1 response
            13 views
            0 likes
            Last Post NinjaTrader_LuisH  
            Started by chartchart, 05-19-2021, 04:14 PM
            3 responses
            577 views
            1 like
            Last Post NinjaTrader_Gaby  
            Started by bsbisme, Yesterday, 02:08 PM
            1 response
            15 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by prdecast, Today, 06:07 AM
            1 response
            4 views
            0 likes
            Last Post NinjaTrader_LuisH  
            Started by i019945nj, 12-14-2023, 06:41 AM
            3 responses
            60 views
            0 likes
            Last Post i019945nj  
            Working...
            X